< Summary

Class:GDX.Tables.StableTable
Assembly:GDX
File(s):D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Tables/StableTable.cs
Covered lines:0
Uncovered lines:1213
Coverable lines:1213
Total lines:1953
Line coverage:0% (0 of 1213)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:170
Method coverage:0% (0 of 170)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
StableTable()0%2100%
StableTable()0%2100%
GetDataVersion()0%2100%
GetColumnCount()0%2100%
GetRowCount()0%2100%
GetDisplayName()0%2100%
SetDisplayName(...)0%2100%
GetFlag(...)0%2100%
SetFlag(...)0%2100%
GetAllRowDescriptions()0%20400%
GetRowDescription(...)0%12300%
GetRowDescription(...)0%2100%
SetAllRowDescriptionsOrder(...)0%2100%
GetColumnDescription(...)0%30500%
GetColumnDescription(...)0%2100%
SetAllColumnDescriptionsOrder(...)0%2100%
GetAllColumnDescriptions()0%12300%
AssertColumnIDValid(...)0%20400%
AssertRowIDValid(...)0%30500%
SetColumnName(...)0%2100%
GetColumnName(...)0%2100%
SetRowName(...)0%2100%
GetRowName(...)0%2100%
GetRowNameRef(...)0%2100%
GetColumnNameRef(...)0%2100%
AddRow(...)0%2401500%
AddRows(...)0%4202000%
AddRows(...)0%4202000%
RemoveRow(...)0%6200%
AddColumn(...)0%9923100%
RemoveColumn(...)0%9303000%
SetString(...)0%2100%
SetBool(...)0%2100%
SetChar(...)0%2100%
SetSByte(...)0%2100%
SetByte(...)0%2100%
SetShort(...)0%2100%
SetUShort(...)0%2100%
SetInt(...)0%2100%
SetUInt(...)0%2100%
SetLong(...)0%2100%
SetULong(...)0%2100%
SetFloat(...)0%2100%
SetDouble(...)0%2100%
SetVector2(...)0%2100%
SetVector3(...)0%2100%
SetVector4(...)0%2100%
SetVector2Int(...)0%2100%
SetVector3Int(...)0%2100%
SetQuaternion(...)0%2100%
SetRect(...)0%2100%
SetRectInt(...)0%2100%
SetColor(...)0%2100%
SetLayerMask(...)0%2100%
SetBounds(...)0%2100%
SetBoundsInt(...)0%2100%
SetHash128(...)0%2100%
SetGradient(...)0%2100%
SetAnimationCurve(...)0%2100%
SetObject(...)0%2100%
SetTypeNameForObjectColumn(...)0%2100%
GetTypeNameForObjectColumn(...)0%2100%
GetString(...)0%2100%
GetBool(...)0%2100%
GetChar(...)0%2100%
GetSByte(...)0%2100%
GetByte(...)0%2100%
GetShort(...)0%2100%
GetUShort(...)0%2100%
GetInt(...)0%2100%
GetUInt(...)0%2100%
GetLong(...)0%2100%
GetULong(...)0%2100%
GetFloat(...)0%2100%
GetDouble(...)0%2100%
GetVector2(...)0%2100%
GetVector3(...)0%2100%
GetVector4(...)0%2100%
GetVector2Int(...)0%2100%
GetVector3Int(...)0%2100%
GetQuaternion(...)0%2100%
GetRect(...)0%2100%
GetRectInt(...)0%2100%
GetColor(...)0%2100%
GetLayerMask(...)0%2100%
GetBounds(...)0%2100%
GetBoundsInt(...)0%2100%
GetHash128(...)0%2100%
GetGradient(...)0%2100%
GetAnimationCurve(...)0%2100%
GetObject(...)0%2100%
GetStringRef(...)0%2100%
GetBoolRef(...)0%2100%
GetCharRef(...)0%2100%
GetSbyteRef(...)0%2100%
GetByteRef(...)0%2100%
GetShortRef(...)0%2100%
GetUshortRef(...)0%2100%
GetIntRef(...)0%2100%
GetUintRef(...)0%2100%
GetLongRef(...)0%2100%
GetUlongRef(...)0%2100%
GetFloatRef(...)0%2100%
GetDoubleRef(...)0%2100%
GetVector2Ref(...)0%2100%
GetVector3Ref(...)0%2100%
GetVector4Ref(...)0%2100%
GetVector2IntRef(...)0%2100%
GetVector3IntRef(...)0%2100%
GetQuaternionRef(...)0%2100%
GetRectRef(...)0%2100%
GetRectIntRef(...)0%2100%
GetColorRef(...)0%2100%
GetLayerMaskRef(...)0%2100%
GetBoundsRef(...)0%2100%
GetBoundsIntRef(...)0%2100%
GetHash128Ref(...)0%2100%
GetGradientRef(...)0%2100%
GetAnimationCurveRef(...)0%2100%
GetObjectRef(...)0%2100%
GetStringColumn(...)0%2100%
GetBoolColumn(...)0%2100%
GetCharColumn(...)0%2100%
GetSbyteColumn(...)0%2100%
GetByteColumn(...)0%2100%
GetShortColumn(...)0%2100%
GetUshortColumn(...)0%2100%
GetIntColumn(...)0%2100%
GetUintColumn(...)0%2100%
GetLongColumn(...)0%2100%
GetUlongColumn(...)0%2100%
GetFloatColumn(...)0%2100%
GetDoubleColumn(...)0%2100%
GetVector2Column(...)0%2100%
GetVector3Column(...)0%2100%
GetVector4Column(...)0%2100%
GetVector2IntColumn(...)0%2100%
GetVector3IntColumn(...)0%2100%
GetQuaternionColumn(...)0%2100%
GetRectColumn(...)0%2100%
GetRectIntColumn(...)0%2100%
GetColorColumn(...)0%2100%
GetLayerMaskColumn(...)0%2100%
GetBoundsColumn(...)0%2100%
GetBoundsIntColumn(...)0%2100%
GetHash128Column(...)0%2100%
GetGradientColumn(...)0%2100%
GetAnimationCurveColumn(...)0%2100%
GetObjectColumn(...)0%2100%
SetColumnOrder(...)0%20400%
SetAllColumnOrders(...)0%6200%
SetRowOrder(...)0%20400%
SetAllRowOrders(...)0%6200%
ReSortRows[T](...)0%30500%
AddTypeNameEntryForUnityObjectColumn()0%12300%
RemoveTypeNameEntryForUnityObjectColumn(...)0%12300%
AssertObjectColumnIDValid(...)0%6200%
AddColumnInternal[T](...)0%4622100%
RemoveColumnInternal[T](...)0%12300%
InsertRowsOfTypeInternal[T](...)0%42600%
DeleteRowsOfTypeInternal[T](...)0%30500%
GetCellRef[T](...)0%2100%
GetCell[T](...)0%2100%
SetCell[T](...)0%2100%
GetColumn[T](...)0%2100%
SetRowOrderForColumns[T](...)0%56700%
AssertSortedColumnsArgValid(...)0%20400%
AssertColumnSortOrderValid(...)0%12300%
AssertRowSortOrderValid(...)0%12300%
AssertSortRowsArgValid(...)0%20400%

File(s)

D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Tables/StableTable.cs

#LineLine coverage
 1// Copyright (c) 2020-2023 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5using System;
 6using GDX.Collections;
 7using UnityEngine;
 8using Object = UnityEngine.Object;
 9
 10namespace GDX.Tables
 11{
 12    [CreateAssetMenu(menuName = "GDX/Stable Table", fileName = "GDXStableTable")]
 13    [Serializable]
 14    public class StableTable : TableBase
 15    {
 016        internal static string UnityObjectString = typeof(Object).AssemblyQualifiedName;
 17
 018        [SerializeField] internal string DisplayName = "GDXStableTable";
 19
 20        [SerializeField] internal ArrayHolder<string>[] AllStringColumns;
 21        [SerializeField] internal ArrayHolder<bool>[] AllBoolColumns;
 22        [SerializeField] internal ArrayHolder<char>[] AllCharColumns;
 23        [SerializeField] internal ArrayHolder<sbyte>[] AllSbyteColumns;
 24        [SerializeField] internal ArrayHolder<byte>[] AllByteColumns;
 25        [SerializeField] internal ArrayHolder<short>[] AllShortColumns;
 26        [SerializeField] internal ArrayHolder<ushort>[] AllUshortColumns;
 27        [SerializeField] internal ArrayHolder<int>[] AllIntColumns;
 28        [SerializeField] internal ArrayHolder<uint>[] AllUintColumns;
 29        [SerializeField] internal ArrayHolder<long>[] AllLongColumns;
 30        [SerializeField] internal ArrayHolder<ulong>[] AllUlongColumns;
 31        [SerializeField] internal ArrayHolder<float>[] AllFloatColumns;
 32        [SerializeField] internal ArrayHolder<double>[] AllDoubleColumns;
 33        [SerializeField] internal ArrayHolder<Vector2>[] AllVector2Columns;
 34        [SerializeField] internal ArrayHolder<Vector3>[] AllVector3Columns;
 35        [SerializeField] internal ArrayHolder<Vector4>[] AllVector4Columns;
 36        [SerializeField] internal ArrayHolder<Vector2Int>[] AllVector2IntColumns;
 37        [SerializeField] internal ArrayHolder<Vector3Int>[] AllVector3IntColumns;
 38        [SerializeField] internal ArrayHolder<Quaternion>[] AllQuaternionColumns;
 39        [SerializeField] internal ArrayHolder<Rect>[] AllRectColumns;
 40        [SerializeField] internal ArrayHolder<RectInt>[] AllRectIntColumns;
 41        [SerializeField] internal ArrayHolder<Color>[] AllColorColumns;
 42        [SerializeField] internal ArrayHolder<LayerMask>[] AllLayerMaskColumns;
 43        [SerializeField] internal ArrayHolder<Bounds>[] AllBoundsColumns;
 44        [SerializeField] internal ArrayHolder<BoundsInt>[] AllBoundsIntColumns;
 45        [SerializeField] internal ArrayHolder<Hash128>[] AllHash128Columns;
 46        [SerializeField] internal ArrayHolder<Gradient>[] AllGradientColumns;
 47        [SerializeField] internal ArrayHolder<AnimationCurve>[] AllAnimationCurveColumns;
 48        [SerializeField] internal ArrayHolder<Object>[] AllObjectRefColumns;
 49        [SerializeField] internal string[] AllObjectRefTypeNames;
 50
 051        [SerializeField] internal ArrayHolder<string>[]
 52            AllColumnNames =
 53                new ArrayHolder<string>[Serializable
 54                    .SerializableTypesCount]; // Contains the name of each column of each type. Ordered by Serializable.
 55
 56        [SerializeField] internal int[] RowIDToDenseIndexMap;
 57        [SerializeField] internal int[] RowDenseIndexToIDMap;
 58        [SerializeField] internal string[] RowNames;
 59        [SerializeField] internal int RowEntriesFreeListHead;
 60
 61        [SerializeField] internal int RowCount;
 62
 63        [SerializeField] internal ColumnEntry[] ColumnIDToDenseIndexMap;
 64        [SerializeField] internal int[] ColumnIDToSortOrderMap;
 65        [SerializeField] internal int[] SortedOrderToColumnIDMap;
 66
 67        // TODO move with other block
 68        [SerializeField]
 069        ArrayHolder<int>[] ColumnDenseIndexToIDMap = new ArrayHolder<int>[Serializable.SerializableTypesCount];
 70
 71        [SerializeField] internal int ColumnEntriesFreeListHead;
 72
 73        [SerializeField] internal int CombinedColumnCount;
 74
 075        [SerializeField] internal ulong DataVersion = 1;
 76
 77        [SerializeField] BitArray8 SettingsFlags;
 78
 79        /// <inheritdoc />
 80        public override ulong GetDataVersion()
 081        {
 082            return DataVersion;
 083        }
 84
 85        /// <inheritdoc />
 86        public override int GetColumnCount()
 087        {
 088            return CombinedColumnCount;
 089        }
 90
 91        /// <inheritdoc />
 92        public override int GetRowCount()
 093        {
 094            return RowCount;
 095        }
 96
 97        /// <inheritdoc />
 98        public override string GetDisplayName()
 099        {
 0100            return DisplayName;
 0101        }
 102
 103        /// <inheritdoc />
 104        public override void SetDisplayName(string displayName)
 0105        {
 0106            DisplayName = displayName;
 0107        }
 108
 109        /// <inheritdoc />
 110        public override bool GetFlag(Flags flag)
 0111        {
 0112            return SettingsFlags[(byte)flag];
 0113        }
 114
 115        /// <inheritdoc />
 116        public override void SetFlag(Flags flag, bool toggle)
 0117        {
 0118            SettingsFlags[(byte)flag] = toggle;
 0119        }
 120
 121        /// <inheritdoc />
 122        public override RowDescription[] GetAllRowDescriptions()
 0123        {
 0124            if (CombinedColumnCount == 0 || RowCount == 0)
 0125            {
 0126                return null;
 127            }
 128
 0129            RowDescription[] returnArray = new RowDescription[RowCount];
 0130            for (int i = 0; i < RowCount; i++)
 0131            {
 0132                returnArray[i].Identifier = RowDenseIndexToIDMap[i];
 0133                returnArray[i].Name = RowNames[i];
 0134            }
 135
 0136            return returnArray;
 0137        }
 138
 139        /// <inheritdoc />
 140        public override RowDescription GetRowDescription(string name)
 0141        {
 0142            for (int i = 0; i < RowCount; i++)
 0143            {
 0144                string nameAt = RowNames[i];
 145
 0146                if (nameAt == name)
 0147                {
 0148                    return new RowDescription { Identifier = RowDenseIndexToIDMap[i], Name = nameAt };
 149                }
 0150            }
 151
 0152            throw new ArgumentException("Row with name " + name + " does not exist in the table");
 0153        }
 154
 155        /// <inheritdoc />
 156        public override RowDescription GetRowDescription(int order)
 0157        {
 0158            return new RowDescription { Identifier = RowDenseIndexToIDMap[order], Name = RowNames[order] };
 0159        }
 160
 161        /// <inheritdoc />
 162        public override void SetAllRowDescriptionsOrder(RowDescription[] orderedRows)
 0163        {
 164            // TODO: @adam array coming in be in the new order, just use the internalIndex (stable to reorder inside her
 0165            throw new NotImplementedException();
 166        }
 167
 168        /// <inheritdoc />
 169        public override ColumnDescription GetColumnDescription(string name)
 0170        {
 0171            for (int i = 0; i < Serializable.SerializableTypesCount; i++)
 0172            {
 0173                string[] columnNames = AllColumnNames[i].TArray;
 174
 0175                if (columnNames != null)
 0176                {
 0177                    for (int j = 0; j < columnNames.Length; j++)
 0178                    {
 0179                        string nameAt = columnNames[j];
 180
 0181                        if (name == nameAt)
 0182                        {
 0183                            int columnID = ColumnDenseIndexToIDMap[i].TArray[j];
 184
 0185                            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[columnID];
 0186                            return new ColumnDescription
 187                            {
 188                                Identifier = columnID, Name = nameAt, Type = columnEntry.ColumnType
 189                            };
 190                        }
 0191                    }
 0192                }
 0193            }
 194
 0195            throw new ArgumentException("Column with name " + name + " does not exist in the table");
 0196        }
 197
 198        /// <inheritdoc />
 199        public override ColumnDescription GetColumnDescription(int order)
 0200        {
 0201            int idAtOrderedIndex = SortedOrderToColumnIDMap[order];
 0202            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[idAtOrderedIndex];
 203
 0204            string columnName = AllColumnNames[(int)columnEntry.ColumnType][columnEntry.ColumnDenseIndex];
 205
 0206            return new ColumnDescription
 207            {
 208                Identifier = idAtOrderedIndex, Name = columnName, Type = columnEntry.ColumnType
 209            };
 0210        }
 211
 212        /// <inheritdoc />
 213        public override void SetAllColumnDescriptionsOrder(ColumnDescription[] orderedColumns)
 0214        {
 215            // TODO: @adam array coming in be in the new order, just use the internalIndex (stable to reorder inside her
 0216            throw new NotImplementedException();
 217        }
 218
 219        /// <inheritdoc />
 220        public override ColumnDescription[] GetAllColumnDescriptions()
 0221        {
 0222            if (CombinedColumnCount == 0)
 0223            {
 0224                return null;
 225            }
 226
 0227            ColumnDescription[] returnArray = new ColumnDescription[CombinedColumnCount];
 228
 0229            for (int i = 0; i < CombinedColumnCount; i++)
 0230            {
 0231                int columnID = SortedOrderToColumnIDMap[i];
 0232                AssertColumnIDValid(columnID);
 0233                ref ColumnEntry entryForID = ref ColumnIDToDenseIndexMap[columnID];
 0234                ref ArrayHolder<string> nameColumnsForType = ref AllColumnNames[(int)entryForID.ColumnType];
 235
 0236                string name = nameColumnsForType[entryForID.ColumnDenseIndex];
 237
 0238                returnArray[i] = new ColumnDescription
 239                {
 240                    Name = name, Identifier = columnID, Type = entryForID.ColumnType
 241                };
 0242            }
 243
 0244            return returnArray;
 0245        }
 246
 247        internal void AssertColumnIDValid(int columnID)
 0248        {
 0249            if (columnID < 0 || columnID >= ColumnIDToDenseIndexMap.Length)
 0250            {
 0251                throw new ArgumentException("Invalid column outside valid ID range: " + columnID);
 252            }
 253
 0254            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[columnID];
 255
 0256            if (columnEntry.ColumnType == Serializable.SerializableTypes.Invalid)
 0257            {
 0258                throw new ArgumentException("Invalid column pointing to deallocated entry: " + columnID);
 259            }
 0260        }
 261
 262        internal void AssertRowIDValid(int rowID)
 0263        {
 0264            if (rowID < 0 || rowID >= RowIDToDenseIndexMap.Length)
 0265            {
 0266                throw new ArgumentException("Invalid row outside valid ID range: " + rowID);
 267            }
 268
 0269            int rowIndex = RowIDToDenseIndexMap[rowID];
 270
 0271            if (rowIndex >= RowCount || rowIndex < 0)
 0272            {
 0273                throw new ArgumentException("Invalid row outside valid ID range: " + rowID);
 274            }
 0275        }
 276
 277        /// <inheritdoc />
 278        public override void SetColumnName(string columnName, int columnIdentifier)
 0279        {
 0280            AssertColumnIDValid(columnIdentifier);
 0281            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[columnIdentifier];
 0282            AllColumnNames[(int)columnEntry.ColumnType][columnEntry.ColumnDenseIndex] = columnName;
 0283        }
 284
 285        /// <inheritdoc />
 286        public override string GetColumnName(int columnIdentifier)
 0287        {
 0288            AssertColumnIDValid(columnIdentifier);
 0289            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[columnIdentifier];
 0290            return AllColumnNames[(int)columnEntry.ColumnType][columnEntry.ColumnDenseIndex];
 0291        }
 292
 293
 294        /// <inheritdoc />
 295        public override void SetRowName(string rowName, int rowIdentifier)
 0296        {
 0297            AssertRowIDValid(rowIdentifier);
 0298            int rowDenseIndex = RowIDToDenseIndexMap[rowIdentifier];
 0299            RowNames[rowDenseIndex] = rowName;
 0300        }
 301
 302        /// <inheritdoc />
 303        public override string GetRowName(int rowIdentifier)
 0304        {
 0305            AssertRowIDValid(rowIdentifier);
 0306            int rowDenseIndex = RowIDToDenseIndexMap[rowIdentifier];
 0307            return RowNames[rowDenseIndex];
 0308        }
 309
 310        public ref string GetRowNameRef(int row)
 0311        {
 0312            AssertRowIDValid(row);
 0313            int rowDenseIndex = RowIDToDenseIndexMap[row];
 0314            return ref RowNames[rowDenseIndex];
 0315        }
 316
 317        public ref string GetColumnNameRef(int columnID)
 0318        {
 0319            AssertColumnIDValid(columnID);
 0320            ref ColumnEntry columnEntry = ref ColumnIDToDenseIndexMap[columnID];
 0321            return ref AllColumnNames[(int)columnEntry.ColumnType][columnEntry.ColumnDenseIndex];
 0322        }
 323
 324        /// <inheritdoc />
 325        public override int AddRow(string rowName = null, int insertAtRowID = -1)
 0326        {
 0327            if (insertAtRowID >= 0)
 0328            {
 0329                AssertRowIDValid(insertAtRowID);
 0330            }
 331
 0332            int rowID = RowEntriesFreeListHead;
 0333            int rowIDToDenseIndexMapLength = RowIDToDenseIndexMap?.Length ?? 0;
 0334            if (rowID >= rowIDToDenseIndexMapLength)
 0335            {
 0336                int newSize = rowID * 2;
 0337                newSize = newSize == 0 ? 1 : newSize;
 0338                Array.Resize(ref RowIDToDenseIndexMap, newSize);
 0339                for (int i = rowID; i < newSize; i++)
 0340                {
 0341                    RowIDToDenseIndexMap[i] = i + 1;
 0342                }
 0343            }
 344
 0345            int denseIndexToIDMapLength = RowDenseIndexToIDMap?.Length ?? 0;
 0346            Array.Resize(ref RowDenseIndexToIDMap, denseIndexToIDMapLength + 1);
 0347            Array.Resize(ref RowNames, denseIndexToIDMapLength + 1);
 348
 0349            int insertAt = insertAtRowID < 0 ? RowCount : RowIDToDenseIndexMap[insertAtRowID];
 350
 0351            for (int i = denseIndexToIDMapLength; i > insertAt; i--)
 0352            {
 0353                int currentRowID = RowDenseIndexToIDMap[i - 1];
 0354                RowDenseIndexToIDMap[i] = currentRowID;
 355
 0356                RowIDToDenseIndexMap[currentRowID] = i;
 357
 0358                RowNames[i] = RowNames[i - 1];
 0359            }
 360
 0361            RowEntriesFreeListHead = RowIDToDenseIndexMap[rowID];
 0362            RowIDToDenseIndexMap[rowID] = insertAt;
 0363            RowDenseIndexToIDMap[insertAt] = rowID;
 0364            RowNames[insertAt] = rowName == null ? rowID.ToString() : rowName;
 365
 0366            InsertRowsOfTypeInternal(ref AllStringColumns, insertAt, 1);
 0367            InsertRowsOfTypeInternal(ref AllBoolColumns, insertAt, 1);
 0368            InsertRowsOfTypeInternal(ref AllCharColumns, insertAt, 1);
 0369            InsertRowsOfTypeInternal(ref AllSbyteColumns, insertAt, 1);
 0370            InsertRowsOfTypeInternal(ref AllByteColumns, insertAt, 1);
 0371            InsertRowsOfTypeInternal(ref AllShortColumns, insertAt, 1);
 0372            InsertRowsOfTypeInternal(ref AllUshortColumns, insertAt, 1);
 0373            InsertRowsOfTypeInternal(ref AllIntColumns, insertAt, 1);
 0374            InsertRowsOfTypeInternal(ref AllUintColumns, insertAt, 1);
 0375            InsertRowsOfTypeInternal(ref AllLongColumns, insertAt, 1);
 0376            InsertRowsOfTypeInternal(ref AllUlongColumns, insertAt, 1);
 0377            InsertRowsOfTypeInternal(ref AllFloatColumns, insertAt, 1);
 0378            InsertRowsOfTypeInternal(ref AllDoubleColumns, insertAt, 1);
 0379            InsertRowsOfTypeInternal(ref AllVector2Columns, insertAt, 1);
 0380            InsertRowsOfTypeInternal(ref AllVector3Columns, insertAt, 1);
 0381            InsertRowsOfTypeInternal(ref AllVector4Columns, insertAt, 1);
 0382            InsertRowsOfTypeInternal(ref AllVector2IntColumns, insertAt, 1);
 0383            InsertRowsOfTypeInternal(ref AllVector3IntColumns, insertAt, 1);
 0384            InsertRowsOfTypeInternal(ref AllQuaternionColumns, insertAt, 1);
 0385            InsertRowsOfTypeInternal(ref AllRectColumns, insertAt, 1);
 0386            InsertRowsOfTypeInternal(ref AllRectIntColumns, insertAt, 1);
 0387            InsertRowsOfTypeInternal(ref AllColorColumns, insertAt, 1);
 0388            InsertRowsOfTypeInternal(ref AllLayerMaskColumns, insertAt, 1);
 0389            InsertRowsOfTypeInternal(ref AllBoundsColumns, insertAt, 1);
 0390            InsertRowsOfTypeInternal(ref AllBoundsIntColumns, insertAt, 1);
 0391            InsertRowsOfTypeInternal(ref AllHash128Columns, insertAt, 1);
 0392            InsertRowsOfTypeInternal(ref AllGradientColumns, insertAt, 1);
 0393            InsertRowsOfTypeInternal(ref AllAnimationCurveColumns, insertAt, 1);
 0394            InsertRowsOfTypeInternal(ref AllObjectRefColumns, insertAt, 1);
 395
 0396            ++RowCount;
 0397            DataVersion++;
 398
 0399            return rowID;
 0400        }
 401
 402        public void AddRows(int numberOfNewRows, string[] rowNames = null, int insertAtRowID = -1)
 0403        {
 0404            if (insertAtRowID >= 0)
 0405            {
 0406                AssertRowIDValid(insertAtRowID);
 0407            }
 408
 0409            int rowIDToDenseIndexMapLength = RowIDToDenseIndexMap?.Length ?? 0;
 0410            int newCount = RowCount + numberOfNewRows;
 0411            if (newCount > rowIDToDenseIndexMapLength)
 0412            {
 0413                int newSize = newCount;
 0414                --newSize;
 0415                newSize |= newSize >> 1;
 0416                newSize |= newSize >> 2;
 0417                newSize |= newSize >> 4;
 0418                newSize |= newSize >> 8;
 0419                newSize |= newSize >> 16;
 0420                ++newSize;
 421
 0422                newSize = newSize == 0 ? 1 : newSize;
 0423                Array.Resize(ref RowIDToDenseIndexMap, newSize);
 0424                for (int i = rowIDToDenseIndexMapLength; i < newSize; i++)
 0425                {
 0426                    RowIDToDenseIndexMap[i] = i + 1;
 0427                }
 0428            }
 429
 0430            int denseIndexToIDMapLength = RowDenseIndexToIDMap?.Length ?? 0;
 0431            Array.Resize(ref RowDenseIndexToIDMap, denseIndexToIDMapLength + numberOfNewRows);
 0432            Array.Resize(ref rowNames, denseIndexToIDMapLength + numberOfNewRows);
 433
 0434            int insertAt = insertAtRowID < 0 ? RowCount : RowIDToDenseIndexMap[insertAtRowID];
 435
 0436            for (int i = denseIndexToIDMapLength; i > insertAt + numberOfNewRows - 1; i--)
 0437            {
 0438                int currentRowID = RowDenseIndexToIDMap[i - numberOfNewRows];
 0439                RowDenseIndexToIDMap[i] = currentRowID;
 440
 0441                RowIDToDenseIndexMap[currentRowID] = i;
 442
 0443                rowNames[i] = rowNames[i - numberOfNewRows];
 0444            }
 445
 0446            int freeListHead = RowEntriesFreeListHead;
 447
 0448            for (int i = 0; i < numberOfNewRows; i++)
 0449            {
 0450                int rowID = freeListHead;
 0451                freeListHead = RowIDToDenseIndexMap[rowID];
 0452                RowIDToDenseIndexMap[rowID] = insertAt + i;
 0453                RowDenseIndexToIDMap[insertAt + i] = rowID;
 0454            }
 455
 0456            int numberOfNewRowNames = rowNames?.Length ?? 0;
 0457            string emptyString = string.Empty;
 0458            for (int i = 0; i < numberOfNewRowNames; i++)
 0459            {
 0460                string currentRowName = rowNames[i];
 0461                int rowIDAt = RowDenseIndexToIDMap[insertAt + i];
 0462                rowNames[insertAt + i] = currentRowName == null ? rowIDAt.ToString() : currentRowName;
 0463            }
 464
 0465            for (int i = numberOfNewRowNames; i < numberOfNewRows; i++)
 0466            {
 0467                int rowIDAt = RowDenseIndexToIDMap[insertAt + i];
 0468                rowNames[insertAt + i] = rowIDAt.ToString();
 0469            }
 470
 0471            RowEntriesFreeListHead = freeListHead;
 472
 0473            InsertRowsOfTypeInternal(ref AllStringColumns, insertAt, numberOfNewRows);
 0474            InsertRowsOfTypeInternal(ref AllBoolColumns, insertAt, numberOfNewRows);
 0475            InsertRowsOfTypeInternal(ref AllCharColumns, insertAt, numberOfNewRows);
 0476            InsertRowsOfTypeInternal(ref AllSbyteColumns, insertAt, numberOfNewRows);
 0477            InsertRowsOfTypeInternal(ref AllByteColumns, insertAt, numberOfNewRows);
 0478            InsertRowsOfTypeInternal(ref AllShortColumns, insertAt, numberOfNewRows);
 0479            InsertRowsOfTypeInternal(ref AllUshortColumns, insertAt, numberOfNewRows);
 0480            InsertRowsOfTypeInternal(ref AllIntColumns, insertAt, numberOfNewRows);
 0481            InsertRowsOfTypeInternal(ref AllUintColumns, insertAt, numberOfNewRows);
 0482            InsertRowsOfTypeInternal(ref AllLongColumns, insertAt, numberOfNewRows);
 0483            InsertRowsOfTypeInternal(ref AllUlongColumns, insertAt, numberOfNewRows);
 0484            InsertRowsOfTypeInternal(ref AllFloatColumns, insertAt, numberOfNewRows);
 0485            InsertRowsOfTypeInternal(ref AllDoubleColumns, insertAt, numberOfNewRows);
 0486            InsertRowsOfTypeInternal(ref AllVector2Columns, insertAt, numberOfNewRows);
 0487            InsertRowsOfTypeInternal(ref AllVector3Columns, insertAt, numberOfNewRows);
 0488            InsertRowsOfTypeInternal(ref AllVector4Columns, insertAt, numberOfNewRows);
 0489            InsertRowsOfTypeInternal(ref AllVector2IntColumns, insertAt, numberOfNewRows);
 0490            InsertRowsOfTypeInternal(ref AllVector3IntColumns, insertAt, numberOfNewRows);
 0491            InsertRowsOfTypeInternal(ref AllQuaternionColumns, insertAt, numberOfNewRows);
 0492            InsertRowsOfTypeInternal(ref AllRectColumns, insertAt, numberOfNewRows);
 0493            InsertRowsOfTypeInternal(ref AllRectIntColumns, insertAt, numberOfNewRows);
 0494            InsertRowsOfTypeInternal(ref AllColorColumns, insertAt, numberOfNewRows);
 0495            InsertRowsOfTypeInternal(ref AllLayerMaskColumns, insertAt, numberOfNewRows);
 0496            InsertRowsOfTypeInternal(ref AllBoundsColumns, insertAt, numberOfNewRows);
 0497            InsertRowsOfTypeInternal(ref AllBoundsIntColumns, insertAt, numberOfNewRows);
 0498            InsertRowsOfTypeInternal(ref AllHash128Columns, insertAt, numberOfNewRows);
 0499            InsertRowsOfTypeInternal(ref AllGradientColumns, insertAt, numberOfNewRows);
 0500            InsertRowsOfTypeInternal(ref AllAnimationCurveColumns, insertAt, numberOfNewRows);
 0501            InsertRowsOfTypeInternal(ref AllObjectRefColumns, insertAt, numberOfNewRows);
 502
 0503            RowCount += numberOfNewRows;
 0504            DataVersion++;
 0505        }
 506
 507        public void AddRows(int numberOfNewRows, ref int[] rowIDs, string[] rowNames = null, int insertAtRowID = -1)
 0508        {
 0509            if (insertAtRowID >= 0)
 0510            {
 0511                AssertRowIDValid(insertAtRowID);
 0512            }
 513
 0514            int rowIDToDenseIndexMapLength = RowIDToDenseIndexMap?.Length ?? 0;
 0515            int newCount = RowCount + numberOfNewRows;
 0516            if (newCount > rowIDToDenseIndexMapLength)
 0517            {
 0518                int newSize = newCount;
 0519                --newSize;
 0520                newSize |= newSize >> 1;
 0521                newSize |= newSize >> 2;
 0522                newSize |= newSize >> 4;
 0523                newSize |= newSize >> 8;
 0524                newSize |= newSize >> 16;
 0525                ++newSize;
 526
 0527                newSize = newSize == 0 ? 1 : newSize;
 0528                Array.Resize(ref RowIDToDenseIndexMap, newSize);
 0529                for (int i = rowIDToDenseIndexMapLength; i < newSize; i++)
 0530                {
 0531                    RowIDToDenseIndexMap[i] = i + 1;
 0532                }
 0533            }
 534
 0535            int denseIndexToIDMapLength = RowDenseIndexToIDMap?.Length ?? 0;
 0536            Array.Resize(ref RowDenseIndexToIDMap, denseIndexToIDMapLength + numberOfNewRows);
 537
 0538            int insertAt = insertAtRowID < 0 ? RowCount : RowIDToDenseIndexMap[insertAtRowID];
 539
 0540            for (int i = denseIndexToIDMapLength; i > insertAt + numberOfNewRows - 1; i--)
 0541            {
 0542                int currentRowID = RowDenseIndexToIDMap[i - numberOfNewRows];
 0543                RowDenseIndexToIDMap[i] = currentRowID;
 544
 0545                RowIDToDenseIndexMap[currentRowID] = i;
 546
 0547                rowNames[i] = rowNames[i - numberOfNewRows];
 0548            }
 549
 0550            int freeListHead = RowEntriesFreeListHead;
 551
 0552            for (int i = 0; i < numberOfNewRows; i++)
 0553            {
 0554                int rowID = freeListHead;
 0555                freeListHead = RowIDToDenseIndexMap[rowID];
 0556                RowIDToDenseIndexMap[rowID] = insertAt + i;
 0557                RowDenseIndexToIDMap[insertAt + i] = rowID;
 0558                rowIDs[i] = rowID;
 0559            }
 560
 0561            int numberOfNewRowNames = rowNames?.Length ?? 0;
 0562            for (int i = 0; i < numberOfNewRowNames; i++)
 0563            {
 0564                string currentRowName = rowNames[i];
 0565                int rowIDAt = RowDenseIndexToIDMap[insertAt + i];
 0566                rowNames[insertAt + i] = currentRowName == null ? rowIDAt.ToString() : currentRowName;
 0567            }
 568
 0569            for (int i = numberOfNewRowNames; i < numberOfNewRows; i++)
 0570            {
 0571                int rowIDAt = RowDenseIndexToIDMap[insertAt + i];
 0572                rowNames[insertAt + i] = rowIDAt.ToString();
 0573            }
 574
 0575            RowEntriesFreeListHead = freeListHead;
 576
 0577            InsertRowsOfTypeInternal(ref AllStringColumns, insertAt, numberOfNewRows);
 0578            InsertRowsOfTypeInternal(ref AllBoolColumns, insertAt, numberOfNewRows);
 0579            InsertRowsOfTypeInternal(ref AllCharColumns, insertAt, numberOfNewRows);
 0580            InsertRowsOfTypeInternal(ref AllSbyteColumns, insertAt, numberOfNewRows);
 0581            InsertRowsOfTypeInternal(ref AllByteColumns, insertAt, numberOfNewRows);
 0582            InsertRowsOfTypeInternal(ref AllShortColumns, insertAt, numberOfNewRows);
 0583            InsertRowsOfTypeInternal(ref AllUshortColumns, insertAt, numberOfNewRows);
 0584            InsertRowsOfTypeInternal(ref AllIntColumns, insertAt, numberOfNewRows);
 0585            InsertRowsOfTypeInternal(ref AllUintColumns, insertAt, numberOfNewRows);
 0586            InsertRowsOfTypeInternal(ref AllLongColumns, insertAt, numberOfNewRows);
 0587            InsertRowsOfTypeInternal(ref AllUlongColumns, insertAt, numberOfNewRows);
 0588            InsertRowsOfTypeInternal(ref AllFloatColumns, insertAt, numberOfNewRows);
 0589            InsertRowsOfTypeInternal(ref AllDoubleColumns, insertAt, numberOfNewRows);
 0590            InsertRowsOfTypeInternal(ref AllVector2Columns, insertAt, numberOfNewRows);
 0591            InsertRowsOfTypeInternal(ref AllVector3Columns, insertAt, numberOfNewRows);
 0592            InsertRowsOfTypeInternal(ref AllVector4Columns, insertAt, numberOfNewRows);
 0593            InsertRowsOfTypeInternal(ref AllVector2IntColumns, insertAt, numberOfNewRows);
 0594            InsertRowsOfTypeInternal(ref AllVector3IntColumns, insertAt, numberOfNewRows);
 0595            InsertRowsOfTypeInternal(ref AllQuaternionColumns, insertAt, numberOfNewRows);
 0596            InsertRowsOfTypeInternal(ref AllRectColumns, insertAt, numberOfNewRows);
 0597            InsertRowsOfTypeInternal(ref AllRectIntColumns, insertAt, numberOfNewRows);
 0598            InsertRowsOfTypeInternal(ref AllColorColumns, insertAt, numberOfNewRows);
 0599            InsertRowsOfTypeInternal(ref AllLayerMaskColumns, insertAt, numberOfNewRows);
 0600            InsertRowsOfTypeInternal(ref AllBoundsColumns, insertAt, numberOfNewRows);
 0601            InsertRowsOfTypeInternal(ref AllBoundsIntColumns, insertAt, numberOfNewRows);
 0602            InsertRowsOfTypeInternal(ref AllHash128Columns, insertAt, numberOfNewRows);
 0603            InsertRowsOfTypeInternal(ref AllGradientColumns, insertAt, numberOfNewRows);
 0604            InsertRowsOfTypeInternal(ref AllAnimationCurveColumns, insertAt, numberOfNewRows);
 0605            InsertRowsOfTypeInternal(ref AllObjectRefColumns, insertAt, numberOfNewRows);
 606
 0607            RowCount += numberOfNewRows;
 0608            DataVersion++;
 0609        }
 610
 611        /// <inheritdoc />
 612        public override void RemoveRow(int rowID)
 0613        {
 0614            AssertRowIDValid(rowID);
 0615            int rowDenseIndex = RowIDToDenseIndexMap[rowID];
 0616            for (int i = rowDenseIndex + 1; i < RowCount; i++)
 0617            {
 0618                int currentRowID = RowDenseIndexToIDMap[i];
 0619                RowIDToDenseIndexMap[currentRowID] = i - 1;
 0620                RowDenseIndexToIDMap[i - 1] = currentRowID;
 0621                RowNames[i - 1] = RowNames[i];
 0622            }
 623
 0624            RowIDToDenseIndexMap[rowID] = RowEntriesFreeListHead;
 0625            RowEntriesFreeListHead = rowID;
 0626            Array.Resize(ref RowDenseIndexToIDMap, RowCount - 1);
 0627            Array.Resize(ref RowNames, RowCount - 1);
 628
 0629            DeleteRowsOfTypeInternal(ref AllStringColumns, rowID, 1);
 0630            DeleteRowsOfTypeInternal(ref AllBoolColumns, rowID, 1);
 0631            DeleteRowsOfTypeInternal(ref AllCharColumns, rowID, 1);
 0632            DeleteRowsOfTypeInternal(ref AllSbyteColumns, rowID, 1);
 0633            DeleteRowsOfTypeInternal(ref AllByteColumns, rowID, 1);
 0634            DeleteRowsOfTypeInternal(ref AllShortColumns, rowID, 1);
 0635            DeleteRowsOfTypeInternal(ref AllUshortColumns, rowID, 1);
 0636            DeleteRowsOfTypeInternal(ref AllIntColumns, rowID, 1);
 0637            DeleteRowsOfTypeInternal(ref AllUintColumns, rowID, 1);
 0638            DeleteRowsOfTypeInternal(ref AllLongColumns, rowID, 1);
 0639            DeleteRowsOfTypeInternal(ref AllUlongColumns, rowID, 1);
 0640            DeleteRowsOfTypeInternal(ref AllFloatColumns, rowID, 1);
 0641            DeleteRowsOfTypeInternal(ref AllDoubleColumns, rowID, 1);
 0642            DeleteRowsOfTypeInternal(ref AllVector2Columns, rowID, 1);
 0643            DeleteRowsOfTypeInternal(ref AllVector3Columns, rowID, 1);
 0644            DeleteRowsOfTypeInternal(ref AllVector4Columns, rowID, 1);
 0645            DeleteRowsOfTypeInternal(ref AllVector2IntColumns, rowID, 1);
 0646            DeleteRowsOfTypeInternal(ref AllVector3IntColumns, rowID, 1);
 0647            DeleteRowsOfTypeInternal(ref AllQuaternionColumns, rowID, 1);
 0648            DeleteRowsOfTypeInternal(ref AllRectColumns, rowID, 1);
 0649            DeleteRowsOfTypeInternal(ref AllRectIntColumns, rowID, 1);
 0650            DeleteRowsOfTypeInternal(ref AllColorColumns, rowID, 1);
 0651            DeleteRowsOfTypeInternal(ref AllLayerMaskColumns, rowID, 1);
 0652            DeleteRowsOfTypeInternal(ref AllBoundsColumns, rowID, 1);
 0653            DeleteRowsOfTypeInternal(ref AllBoundsIntColumns, rowID, 1);
 0654            DeleteRowsOfTypeInternal(ref AllHash128Columns, rowID, 1);
 0655            DeleteRowsOfTypeInternal(ref AllGradientColumns, rowID, 1);
 0656            DeleteRowsOfTypeInternal(ref AllAnimationCurveColumns, rowID, 1);
 0657            DeleteRowsOfTypeInternal(ref AllObjectRefColumns, rowID, 1);
 658
 0659            --RowCount;
 0660            DataVersion++;
 0661        }
 662
 663        /// <inheritdoc />
 664        public override int AddColumn(Serializable.SerializableTypes columnType, string columnName,
 665            int insertAtColumnID = -1)
 0666        {
 0667            switch (columnType)
 668            {
 669                case Serializable.SerializableTypes.String:
 0670                    return AddColumnInternal(columnName, ref AllStringColumns, Serializable.SerializableTypes.String,
 671                        insertAtColumnID);
 672                case Serializable.SerializableTypes.Char:
 0673                    return AddColumnInternal(columnName, ref AllCharColumns, Serializable.SerializableTypes.Char,
 674                        insertAtColumnID);
 675                case Serializable.SerializableTypes.Bool:
 0676                    return AddColumnInternal(columnName, ref AllBoolColumns, Serializable.SerializableTypes.Bool,
 677                        insertAtColumnID);
 678                case Serializable.SerializableTypes.SByte:
 0679                    return AddColumnInternal(columnName, ref AllSbyteColumns, Serializable.SerializableTypes.SByte,
 680                        insertAtColumnID);
 681                case Serializable.SerializableTypes.Byte:
 0682                    return AddColumnInternal(columnName, ref AllByteColumns, Serializable.SerializableTypes.Byte,
 683                        insertAtColumnID);
 684                case Serializable.SerializableTypes.Short:
 0685                    return AddColumnInternal(columnName, ref AllShortColumns, Serializable.SerializableTypes.Short,
 686                        insertAtColumnID);
 687                case Serializable.SerializableTypes.UShort:
 0688                    return AddColumnInternal(columnName, ref AllUshortColumns, Serializable.SerializableTypes.UShort,
 689                        insertAtColumnID);
 690                case Serializable.SerializableTypes.Int:
 0691                    return AddColumnInternal(columnName, ref AllIntColumns, Serializable.SerializableTypes.Int,
 692                        insertAtColumnID);
 693                case Serializable.SerializableTypes.UInt:
 0694                    return AddColumnInternal(columnName, ref AllUintColumns, Serializable.SerializableTypes.UInt,
 695                        insertAtColumnID);
 696                case Serializable.SerializableTypes.Long:
 0697                    return AddColumnInternal(columnName, ref AllLongColumns, Serializable.SerializableTypes.Long,
 698                        insertAtColumnID);
 699                case Serializable.SerializableTypes.ULong:
 0700                    return AddColumnInternal(columnName, ref AllUlongColumns, Serializable.SerializableTypes.ULong,
 701                        insertAtColumnID);
 702                case Serializable.SerializableTypes.Float:
 0703                    return AddColumnInternal(columnName, ref AllFloatColumns, Serializable.SerializableTypes.Float,
 704                        insertAtColumnID);
 705                case Serializable.SerializableTypes.Double:
 0706                    return AddColumnInternal(columnName, ref AllDoubleColumns, Serializable.SerializableTypes.Double,
 707                        insertAtColumnID);
 708                case Serializable.SerializableTypes.Vector2:
 0709                    return AddColumnInternal(columnName, ref AllVector2Columns, Serializable.SerializableTypes.Vector2,
 710                        insertAtColumnID);
 711                case Serializable.SerializableTypes.Vector3:
 0712                    return AddColumnInternal(columnName, ref AllVector3Columns, Serializable.SerializableTypes.Vector3,
 713                        insertAtColumnID);
 714                case Serializable.SerializableTypes.Vector4:
 0715                    return AddColumnInternal(columnName, ref AllVector4Columns, Serializable.SerializableTypes.Vector4,
 716                        insertAtColumnID);
 717                case Serializable.SerializableTypes.Vector2Int:
 0718                    return AddColumnInternal(columnName, ref AllVector2IntColumns,
 719                        Serializable.SerializableTypes.Vector2Int, insertAtColumnID);
 720                case Serializable.SerializableTypes.Vector3Int:
 0721                    return AddColumnInternal(columnName, ref AllVector3IntColumns,
 722                        Serializable.SerializableTypes.Vector3Int, insertAtColumnID);
 723                case Serializable.SerializableTypes.Quaternion:
 0724                    return AddColumnInternal(columnName, ref AllQuaternionColumns,
 725                        Serializable.SerializableTypes.Quaternion, insertAtColumnID);
 726                case Serializable.SerializableTypes.Rect:
 0727                    return AddColumnInternal(columnName, ref AllRectColumns, Serializable.SerializableTypes.Rect,
 728                        insertAtColumnID);
 729                case Serializable.SerializableTypes.RectInt:
 0730                    return AddColumnInternal(columnName, ref AllRectIntColumns, Serializable.SerializableTypes.RectInt,
 731                        insertAtColumnID);
 732                case Serializable.SerializableTypes.Color:
 0733                    return AddColumnInternal(columnName, ref AllColorColumns, Serializable.SerializableTypes.Color,
 734                        insertAtColumnID);
 735                case Serializable.SerializableTypes.LayerMask:
 0736                    return AddColumnInternal(columnName, ref AllLayerMaskColumns,
 737                        Serializable.SerializableTypes.LayerMask, insertAtColumnID);
 738                case Serializable.SerializableTypes.Bounds:
 0739                    return AddColumnInternal(columnName, ref AllBoundsColumns, Serializable.SerializableTypes.Bounds,
 740                        insertAtColumnID);
 741                case Serializable.SerializableTypes.BoundsInt:
 0742                    return AddColumnInternal(columnName, ref AllBoundsIntColumns,
 743                        Serializable.SerializableTypes.BoundsInt, insertAtColumnID);
 744                case Serializable.SerializableTypes.Hash128:
 0745                    return AddColumnInternal(columnName, ref AllHash128Columns, Serializable.SerializableTypes.Hash128,
 746                        insertAtColumnID);
 747                case Serializable.SerializableTypes.Gradient:
 0748                    return AddColumnInternal(columnName, ref AllGradientColumns,
 749                        Serializable.SerializableTypes.Gradient, insertAtColumnID);
 750                case Serializable.SerializableTypes.AnimationCurve:
 0751                    return AddColumnInternal(columnName, ref AllAnimationCurveColumns,
 752                        Serializable.SerializableTypes.AnimationCurve, insertAtColumnID);
 753                case Serializable.SerializableTypes.Object:
 0754                    return AddColumnInternal(columnName, ref AllObjectRefColumns, Serializable.SerializableTypes.Object,
 755                        insertAtColumnID);
 756            }
 757
 0758            return -1;
 0759        }
 760
 761        /// <inheritdoc />
 762        public override void RemoveColumn(Serializable.SerializableTypes columnType, int columnID)
 0763        {
 0764            switch (columnType)
 765            {
 766                case Serializable.SerializableTypes.String:
 0767                    RemoveColumnInternal(ref AllStringColumns, Serializable.SerializableTypes.String, columnID);
 0768                    break;
 769                case Serializable.SerializableTypes.Char:
 0770                    RemoveColumnInternal(ref AllCharColumns, Serializable.SerializableTypes.Char, columnID);
 0771                    break;
 772                case Serializable.SerializableTypes.Bool:
 0773                    RemoveColumnInternal(ref AllBoolColumns, Serializable.SerializableTypes.Bool, columnID);
 0774                    break;
 775                case Serializable.SerializableTypes.SByte:
 0776                    RemoveColumnInternal(ref AllSbyteColumns, Serializable.SerializableTypes.SByte, columnID);
 0777                    break;
 778                case Serializable.SerializableTypes.Byte:
 0779                    RemoveColumnInternal(ref AllByteColumns, Serializable.SerializableTypes.Byte, columnID);
 0780                    break;
 781                case Serializable.SerializableTypes.Short:
 0782                    RemoveColumnInternal(ref AllShortColumns, Serializable.SerializableTypes.Short, columnID);
 0783                    break;
 784                case Serializable.SerializableTypes.UShort:
 0785                    RemoveColumnInternal(ref AllUshortColumns, Serializable.SerializableTypes.UShort, columnID);
 0786                    break;
 787                case Serializable.SerializableTypes.Int:
 0788                    RemoveColumnInternal(ref AllIntColumns, Serializable.SerializableTypes.Int, columnID);
 0789                    break;
 790                case Serializable.SerializableTypes.UInt:
 0791                    RemoveColumnInternal(ref AllUintColumns, Serializable.SerializableTypes.UInt, columnID);
 0792                    break;
 793                case Serializable.SerializableTypes.Long:
 0794                    RemoveColumnInternal(ref AllLongColumns, Serializable.SerializableTypes.Long, columnID);
 0795                    break;
 796                case Serializable.SerializableTypes.ULong:
 0797                    RemoveColumnInternal(ref AllUlongColumns, Serializable.SerializableTypes.ULong, columnID);
 0798                    break;
 799                case Serializable.SerializableTypes.Float:
 0800                    RemoveColumnInternal(ref AllFloatColumns, Serializable.SerializableTypes.Float, columnID);
 0801                    break;
 802                case Serializable.SerializableTypes.Double:
 0803                    RemoveColumnInternal(ref AllDoubleColumns, Serializable.SerializableTypes.Double, columnID);
 0804                    break;
 805                case Serializable.SerializableTypes.Vector2:
 0806                    RemoveColumnInternal(ref AllVector2Columns, Serializable.SerializableTypes.Vector2, columnID);
 0807                    break;
 808                case Serializable.SerializableTypes.Vector3:
 0809                    RemoveColumnInternal(ref AllVector3Columns, Serializable.SerializableTypes.Vector3, columnID);
 0810                    break;
 811                case Serializable.SerializableTypes.Vector4:
 0812                    RemoveColumnInternal(ref AllVector4Columns, Serializable.SerializableTypes.Vector4, columnID);
 0813                    break;
 814                case Serializable.SerializableTypes.Vector2Int:
 0815                    RemoveColumnInternal(ref AllVector2IntColumns, Serializable.SerializableTypes.Vector2Int, columnID);
 0816                    break;
 817                case Serializable.SerializableTypes.Vector3Int:
 0818                    RemoveColumnInternal(ref AllVector3IntColumns, Serializable.SerializableTypes.Vector3Int, columnID);
 0819                    break;
 820                case Serializable.SerializableTypes.Quaternion:
 0821                    RemoveColumnInternal(ref AllQuaternionColumns, Serializable.SerializableTypes.Quaternion, columnID);
 0822                    break;
 823                case Serializable.SerializableTypes.Rect:
 0824                    RemoveColumnInternal(ref AllRectColumns, Serializable.SerializableTypes.Rect, columnID);
 0825                    break;
 826                case Serializable.SerializableTypes.RectInt:
 0827                    RemoveColumnInternal(ref AllRectIntColumns, Serializable.SerializableTypes.RectInt, columnID);
 0828                    break;
 829                case Serializable.SerializableTypes.Color:
 0830                    RemoveColumnInternal(ref AllColorColumns, Serializable.SerializableTypes.Color, columnID);
 0831                    break;
 832                case Serializable.SerializableTypes.LayerMask:
 0833                    RemoveColumnInternal(ref AllLayerMaskColumns, Serializable.SerializableTypes.LayerMask, columnID);
 0834                    break;
 835                case Serializable.SerializableTypes.Bounds:
 0836                    RemoveColumnInternal(ref AllBoundsColumns, Serializable.SerializableTypes.Bounds, columnID);
 0837                    break;
 838                case Serializable.SerializableTypes.BoundsInt:
 0839                    RemoveColumnInternal(ref AllBoundsIntColumns, Serializable.SerializableTypes.BoundsInt, columnID);
 0840                    break;
 841                case Serializable.SerializableTypes.Hash128:
 0842                    RemoveColumnInternal(ref AllHash128Columns, Serializable.SerializableTypes.Hash128, columnID);
 0843                    break;
 844                case Serializable.SerializableTypes.Gradient:
 0845                    RemoveColumnInternal(ref AllGradientColumns, Serializable.SerializableTypes.Gradient, columnID);
 0846                    break;
 847                case Serializable.SerializableTypes.AnimationCurve:
 0848                    RemoveColumnInternal(ref AllAnimationCurveColumns, Serializable.SerializableTypes.AnimationCurve,
 849                        columnID);
 0850                    break;
 851                case Serializable.SerializableTypes.Object:
 0852                    RemoveColumnInternal(ref AllObjectRefColumns, Serializable.SerializableTypes.Object, columnID);
 0853                    break;
 854            }
 0855        }
 856
 857        // Set
 858        /// <inheritdoc />
 859        public override ulong SetString(int rowIdentifier, int columnIdentifier, string newValue)
 0860        {
 0861            return SetCell(rowIdentifier, columnIdentifier, ref AllStringColumns, newValue);
 0862        }
 863
 864        /// <inheritdoc />
 865        public override ulong SetBool(int rowIdentifier, int columnIdentifier, bool newValue)
 0866        {
 0867            return SetCell(rowIdentifier, columnIdentifier, ref AllBoolColumns, newValue);
 0868        }
 869
 870        /// <inheritdoc />
 871        public override ulong SetChar(int rowIdentifier, int columnIdentifier, char newValue)
 0872        {
 0873            return SetCell(rowIdentifier, columnIdentifier, ref AllCharColumns, newValue);
 0874        }
 875
 876        /// <inheritdoc />
 877        public override ulong SetSByte(int rowIdentifier, int columnIdentifier, sbyte newValue)
 0878        {
 0879            return SetCell(rowIdentifier, columnIdentifier, ref AllSbyteColumns, newValue);
 0880        }
 881
 882        /// <inheritdoc />
 883        public override ulong SetByte(int rowIdentifier, int columnIdentifier, byte newValue)
 0884        {
 0885            return SetCell(rowIdentifier, columnIdentifier, ref AllByteColumns, newValue);
 0886        }
 887
 888        /// <inheritdoc />
 889        public override ulong SetShort(int rowIdentifier, int columnIdentifier, short newValue)
 0890        {
 0891            return SetCell(rowIdentifier, columnIdentifier, ref AllShortColumns, newValue);
 0892        }
 893
 894        /// <inheritdoc />
 895        public override ulong SetUShort(int rowIdentifier, int columnIdentifier, ushort newValue)
 0896        {
 0897            return SetCell(rowIdentifier, columnIdentifier, ref AllUshortColumns, newValue);
 0898        }
 899
 900        /// <inheritdoc />
 901        public override ulong SetInt(int rowIdentifier, int columnIdentifier, int newValue)
 0902        {
 0903            return SetCell(rowIdentifier, columnIdentifier, ref AllIntColumns, newValue);
 0904        }
 905
 906        /// <inheritdoc />
 907        public override ulong SetUInt(int rowIdentifier, int columnIdentifier, uint newValue)
 0908        {
 0909            return SetCell(rowIdentifier, columnIdentifier, ref AllUintColumns, newValue);
 0910        }
 911
 912        /// <inheritdoc />
 913        public override ulong SetLong(int rowIdentifier, int columnIdentifier, long newValue)
 0914        {
 0915            return SetCell(rowIdentifier, columnIdentifier, ref AllLongColumns, newValue);
 0916        }
 917
 918        /// <inheritdoc />
 919        public override ulong SetULong(int rowIdentifier, int columnIdentifier, ulong newValue)
 0920        {
 0921            return SetCell(rowIdentifier, columnIdentifier, ref AllUlongColumns, newValue);
 0922        }
 923
 924        /// <inheritdoc />
 925        public override ulong SetFloat(int rowIdentifier, int columnIdentifier, float newValue)
 0926        {
 0927            return SetCell(rowIdentifier, columnIdentifier, ref AllFloatColumns, newValue);
 0928        }
 929
 930        /// <inheritdoc />
 931        public override ulong SetDouble(int rowIdentifier, int columnIdentifier, double newValue)
 0932        {
 0933            return SetCell(rowIdentifier, columnIdentifier, ref AllDoubleColumns, newValue);
 0934        }
 935
 936        /// <inheritdoc />
 937        public override ulong SetVector2(int rowIdentifier, int columnIdentifier, Vector2 newValue)
 0938        {
 0939            return SetCell(rowIdentifier, columnIdentifier, ref AllVector2Columns, newValue);
 0940        }
 941
 942        /// <inheritdoc />
 943        public override ulong SetVector3(int rowIdentifier, int columnIdentifier, Vector3 newValue)
 0944        {
 0945            return SetCell(rowIdentifier, columnIdentifier, ref AllVector3Columns, newValue);
 0946        }
 947
 948        /// <inheritdoc />
 949        public override ulong SetVector4(int rowIdentifier, int columnIdentifier, Vector4 value)
 0950        {
 0951            return SetCell(rowIdentifier, columnIdentifier, ref AllVector4Columns, value);
 0952        }
 953
 954        /// <inheritdoc />
 955        public override ulong SetVector2Int(int rowIdentifier, int columnIdentifier, Vector2Int newValue)
 0956        {
 0957            return SetCell(rowIdentifier, columnIdentifier, ref AllVector2IntColumns, newValue);
 0958        }
 959
 960        /// <inheritdoc />
 961        public override ulong SetVector3Int(int rowIdentifier, int columnIdentifier, Vector3Int newValue)
 0962        {
 0963            return SetCell(rowIdentifier, columnIdentifier, ref AllVector3IntColumns, newValue);
 0964        }
 965
 966        /// <inheritdoc />
 967        public override ulong SetQuaternion(int rowIdentifier, int columnIdentifier, Quaternion newValue)
 0968        {
 0969            return SetCell(rowIdentifier, columnIdentifier, ref AllQuaternionColumns, newValue);
 0970        }
 971
 972        /// <inheritdoc />
 973        public override ulong SetRect(int rowIdentifier, int columnIdentifier, Rect newValue)
 0974        {
 0975            return SetCell(rowIdentifier, columnIdentifier, ref AllRectColumns, newValue);
 0976        }
 977
 978        /// <inheritdoc />
 979        public override ulong SetRectInt(int rowIdentifier, int columnIdentifier, RectInt newValue)
 0980        {
 0981            return SetCell(rowIdentifier, columnIdentifier, ref AllRectIntColumns, newValue);
 0982        }
 983
 984        /// <inheritdoc />
 985        public override ulong SetColor(int rowIdentifier, int columnIdentifier, Color newValue)
 0986        {
 0987            return SetCell(rowIdentifier, columnIdentifier, ref AllColorColumns, newValue);
 0988        }
 989
 990        /// <inheritdoc />
 991        public override ulong SetLayerMask(int rowIdentifier, int columnIdentifier, LayerMask newValue)
 0992        {
 0993            return SetCell(rowIdentifier, columnIdentifier, ref AllLayerMaskColumns, newValue);
 0994        }
 995
 996        /// <inheritdoc />
 997        public override ulong SetBounds(int rowIdentifier, int columnIdentifier, Bounds newValue)
 0998        {
 0999            return SetCell(rowIdentifier, columnIdentifier, ref AllBoundsColumns, newValue);
 01000        }
 1001
 1002        /// <inheritdoc />
 1003        public override ulong SetBoundsInt(int rowIdentifier, int columnIdentifier, BoundsInt newValue)
 01004        {
 01005            return SetCell(rowIdentifier, columnIdentifier, ref AllBoundsIntColumns, newValue);
 01006        }
 1007
 1008        /// <inheritdoc />
 1009        public override ulong SetHash128(int rowIdentifier, int columnIdentifier, Hash128 newValue)
 01010        {
 01011            return SetCell(rowIdentifier, columnIdentifier, ref AllHash128Columns, newValue);
 01012        }
 1013
 1014        /// <inheritdoc />
 1015        public override ulong SetGradient(int rowIdentifier, int columnIdentifier, Gradient newValue)
 01016        {
 01017            return SetCell(rowIdentifier, columnIdentifier, ref AllGradientColumns, newValue);
 01018        }
 1019
 1020        /// <inheritdoc />
 1021        public override ulong SetAnimationCurve(int rowIdentifier, int columnIdentifier, AnimationCurve newValue)
 01022        {
 01023            return SetCell(rowIdentifier, columnIdentifier, ref AllAnimationCurveColumns, newValue);
 01024        }
 1025
 1026        /// <inheritdoc />
 1027        public override ulong SetObject(int rowIdentifier, int columnIdentifier, Object newValue)
 01028        {
 01029            return SetCell(rowIdentifier, columnIdentifier, ref AllObjectRefColumns, newValue);
 01030        }
 1031
 1032        /// <inheritdoc />
 1033        public override void SetTypeNameForObjectColumn(int columnIdentifier, string assemblyQualifiedName)
 01034        {
 01035            AssertObjectColumnIDValid(columnIdentifier);
 01036            int denseIndex = ColumnIDToDenseIndexMap[columnIdentifier].ColumnDenseIndex;
 01037            AllObjectRefTypeNames[denseIndex] = assemblyQualifiedName;
 01038        }
 1039
 1040        /// <inheritdoc />
 1041        public override string GetTypeNameForObjectColumn(int columnIdentifier)
 01042        {
 01043            AssertObjectColumnIDValid(columnIdentifier);
 01044            int denseIndex = ColumnIDToDenseIndexMap[columnIdentifier].ColumnDenseIndex;
 01045            return AllObjectRefTypeNames[denseIndex];
 01046        }
 1047
 1048        // Get
 1049        /// <inheritdoc />
 1050        public override string GetString(int rowIdentifier, int columnIdentifier)
 01051        {
 01052            return GetCell(rowIdentifier, columnIdentifier, ref AllStringColumns);
 01053        }
 1054
 1055        /// <inheritdoc />
 1056        public override bool GetBool(int rowIdentifier, int columnIdentifier)
 01057        {
 01058            return GetCell(rowIdentifier, columnIdentifier, ref AllBoolColumns);
 01059        }
 1060
 1061        /// <inheritdoc />
 1062        public override char GetChar(int rowIdentifier, int columnIdentifier)
 01063        {
 01064            return GetCell(rowIdentifier, columnIdentifier, ref AllCharColumns);
 01065        }
 1066
 1067        /// <inheritdoc />
 1068        public override sbyte GetSByte(int rowIdentifier, int columnIdentifier)
 01069        {
 01070            return GetCell(rowIdentifier, columnIdentifier, ref AllSbyteColumns);
 01071        }
 1072
 1073        /// <inheritdoc />
 1074        public override byte GetByte(int rowIdentifier, int columnIdentifier)
 01075        {
 01076            return GetCell(rowIdentifier, columnIdentifier, ref AllByteColumns);
 01077        }
 1078
 1079        /// <inheritdoc />
 1080        public override short GetShort(int rowIdentifier, int columnIdentifier)
 01081        {
 01082            return GetCell(rowIdentifier, columnIdentifier, ref AllShortColumns);
 01083        }
 1084
 1085        /// <inheritdoc />
 1086        public override ushort GetUShort(int rowIdentifier, int columnIdentifier)
 01087        {
 01088            return GetCell(rowIdentifier, columnIdentifier, ref AllUshortColumns);
 01089        }
 1090
 1091        /// <inheritdoc />
 1092        public override int GetInt(int rowIdentifier, int columnIdentifier)
 01093        {
 01094            return GetCell(rowIdentifier, columnIdentifier, ref AllIntColumns);
 01095        }
 1096
 1097        /// <inheritdoc />
 1098        public override uint GetUInt(int rowIdentifier, int columnIdentifier)
 01099        {
 01100            return GetCell(rowIdentifier, columnIdentifier, ref AllUintColumns);
 01101        }
 1102
 1103        /// <inheritdoc />
 1104        public override long GetLong(int rowIdentifier, int columnIdentifier)
 01105        {
 01106            return GetCell(rowIdentifier, columnIdentifier, ref AllLongColumns);
 01107        }
 1108
 1109        /// <inheritdoc />
 1110        public override ulong GetULong(int rowIdentifier, int columnIdentifier)
 01111        {
 01112            return GetCell(rowIdentifier, columnIdentifier, ref AllUlongColumns);
 01113        }
 1114
 1115        /// <inheritdoc />
 1116        public override float GetFloat(int rowIdentifier, int columnIdentifier)
 01117        {
 01118            return GetCell(rowIdentifier, columnIdentifier, ref AllFloatColumns);
 01119        }
 1120
 1121        /// <inheritdoc />
 1122        public override double GetDouble(int rowIdentifier, int columnIdentifier)
 01123        {
 01124            return GetCell(rowIdentifier, columnIdentifier, ref AllDoubleColumns);
 01125        }
 1126
 1127        /// <inheritdoc />
 1128        public override Vector2 GetVector2(int rowIdentifier, int columnIdentifier)
 01129        {
 01130            return GetCell(rowIdentifier, columnIdentifier, ref AllVector2Columns);
 01131        }
 1132
 1133        /// <inheritdoc />
 1134        public override Vector3 GetVector3(int rowIdentifier, int columnIdentifier)
 01135        {
 01136            return GetCell(rowIdentifier, columnIdentifier, ref AllVector3Columns);
 01137        }
 1138
 1139        /// <inheritdoc />
 1140        public override Vector4 GetVector4(int rowIdentifier, int columnIdentifier)
 01141        {
 01142            return GetCell(rowIdentifier, columnIdentifier, ref AllVector4Columns);
 01143        }
 1144
 1145        /// <inheritdoc />
 1146        public override Vector2Int GetVector2Int(int rowIdentifier, int columnIdentifier)
 01147        {
 01148            return GetCell(rowIdentifier, columnIdentifier, ref AllVector2IntColumns);
 01149        }
 1150
 1151        /// <inheritdoc />
 1152        public override Vector3Int GetVector3Int(int rowIdentifier, int columnIdentifier)
 01153        {
 01154            return GetCell(rowIdentifier, columnIdentifier, ref AllVector3IntColumns);
 01155        }
 1156
 1157        /// <inheritdoc />
 1158        public override Quaternion GetQuaternion(int rowIdentifier, int columnIdentifier)
 01159        {
 01160            return GetCell(rowIdentifier, columnIdentifier, ref AllQuaternionColumns);
 01161        }
 1162
 1163        /// <inheritdoc />
 1164        public override Rect GetRect(int rowIdentifier, int columnIdentifier)
 01165        {
 01166            return GetCell(rowIdentifier, columnIdentifier, ref AllRectColumns);
 01167        }
 1168
 1169        /// <inheritdoc />
 1170        public override RectInt GetRectInt(int rowIdentifier, int columnIdentifier)
 01171        {
 01172            return GetCell(rowIdentifier, columnIdentifier, ref AllRectIntColumns);
 01173        }
 1174
 1175        /// <inheritdoc />
 1176        public override Color GetColor(int rowIdentifier, int columnIdentifier)
 01177        {
 01178            return GetCell(rowIdentifier, columnIdentifier, ref AllColorColumns);
 01179        }
 1180
 1181        /// <inheritdoc />
 1182        public override LayerMask GetLayerMask(int rowIdentifier, int columnIdentifier)
 01183        {
 01184            return GetCell(rowIdentifier, columnIdentifier, ref AllLayerMaskColumns);
 01185        }
 1186
 1187        /// <inheritdoc />
 1188        public override Bounds GetBounds(int rowIdentifier, int columnIdentifier)
 01189        {
 01190            return GetCell(rowIdentifier, columnIdentifier, ref AllBoundsColumns);
 01191        }
 1192
 1193        /// <inheritdoc />
 1194        public override BoundsInt GetBoundsInt(int rowIdentifier, int columnIdentifier)
 01195        {
 01196            return GetCell(rowIdentifier, columnIdentifier, ref AllBoundsIntColumns);
 01197        }
 1198
 1199        /// <inheritdoc />
 1200        public override Hash128 GetHash128(int rowIdentifier, int columnIdentifier)
 01201        {
 01202            return GetCell(rowIdentifier, columnIdentifier, ref AllHash128Columns);
 01203        }
 1204
 1205        /// <inheritdoc />
 1206        public override Gradient GetGradient(int rowIdentifier, int columnIdentifier)
 01207        {
 01208            return GetCell(rowIdentifier, columnIdentifier, ref AllGradientColumns);
 01209        }
 1210
 1211        /// <inheritdoc />
 1212        public override AnimationCurve GetAnimationCurve(int rowIdentifier, int columnIdentifier)
 01213        {
 01214            return GetCell(rowIdentifier, columnIdentifier, ref AllAnimationCurveColumns);
 01215        }
 1216
 1217        /// <inheritdoc />
 1218        public override Object GetObject(int rowIdentifier, int columnIdentifier)
 01219        {
 01220            return GetCell(rowIdentifier, columnIdentifier, ref AllObjectRefColumns);
 01221        }
 1222
 1223        // Get ref
 1224
 1225        public ref string GetStringRef(int row, int column)
 01226        {
 01227            return ref GetCellRef(row, column, ref AllStringColumns);
 01228        }
 1229
 1230        public ref bool GetBoolRef(int row, int column)
 01231        {
 01232            return ref GetCellRef(row, column, ref AllBoolColumns);
 01233        }
 1234
 1235        public ref char GetCharRef(int row, int column)
 01236        {
 01237            return ref GetCellRef(row, column, ref AllCharColumns);
 01238        }
 1239
 1240        public ref sbyte GetSbyteRef(int row, int column)
 01241        {
 01242            return ref GetCellRef(row, column, ref AllSbyteColumns);
 01243        }
 1244
 1245        public ref byte GetByteRef(int row, int columnID)
 01246        {
 01247            return ref GetCellRef(row, columnID, ref AllByteColumns);
 01248        }
 1249
 1250        public ref short GetShortRef(int row, int column)
 01251        {
 01252            return ref GetCellRef(row, column, ref AllShortColumns);
 01253        }
 1254
 1255        public ref ushort GetUshortRef(int row, int column)
 01256        {
 01257            return ref GetCellRef(row, column, ref AllUshortColumns);
 01258        }
 1259
 1260        public ref int GetIntRef(int row, int column)
 01261        {
 01262            return ref GetCellRef(row, column, ref AllIntColumns);
 01263        }
 1264
 1265        public ref uint GetUintRef(int row, int column)
 01266        {
 01267            return ref GetCellRef(row, column, ref AllUintColumns);
 01268        }
 1269
 1270        public ref long GetLongRef(int row, int column)
 01271        {
 01272            return ref GetCellRef(row, column, ref AllLongColumns);
 01273        }
 1274
 1275        public ref ulong GetUlongRef(int row, int column)
 01276        {
 01277            return ref GetCellRef(row, column, ref AllUlongColumns);
 01278        }
 1279
 1280        public ref float GetFloatRef(int row, int column)
 01281        {
 01282            return ref GetCellRef(row, column, ref AllFloatColumns);
 01283        }
 1284
 1285        public ref double GetDoubleRef(int row, int column)
 01286        {
 01287            return ref GetCellRef(row, column, ref AllDoubleColumns);
 01288        }
 1289
 1290        public ref Vector2 GetVector2Ref(int row, int column)
 01291        {
 01292            return ref GetCellRef(row, column, ref AllVector2Columns);
 01293        }
 1294
 1295        public ref Vector3 GetVector3Ref(int row, int column)
 01296        {
 01297            return ref GetCellRef(row, column, ref AllVector3Columns);
 01298        }
 1299
 1300        public ref Vector4 GetVector4Ref(int row, int column)
 01301        {
 01302            return ref GetCellRef(row, column, ref AllVector4Columns);
 01303        }
 1304
 1305        public ref Vector2Int GetVector2IntRef(int row, int column)
 01306        {
 01307            return ref GetCellRef(row, column, ref AllVector2IntColumns);
 01308        }
 1309
 1310        public ref Vector3Int GetVector3IntRef(int row, int column)
 01311        {
 01312            return ref GetCellRef(row, column, ref AllVector3IntColumns);
 01313        }
 1314
 1315        public ref Quaternion GetQuaternionRef(int row, int column)
 01316        {
 01317            return ref GetCellRef(row, column, ref AllQuaternionColumns);
 01318        }
 1319
 1320        public ref Rect GetRectRef(int row, int column)
 01321        {
 01322            return ref GetCellRef(row, column, ref AllRectColumns);
 01323        }
 1324
 1325        public ref RectInt GetRectIntRef(int row, int column)
 01326        {
 01327            return ref GetCellRef(row, column, ref AllRectIntColumns);
 01328        }
 1329
 1330        public ref Color GetColorRef(int row, int column)
 01331        {
 01332            return ref GetCellRef(row, column, ref AllColorColumns);
 01333        }
 1334
 1335        public ref LayerMask GetLayerMaskRef(int row, int column)
 01336        {
 01337            return ref GetCellRef(row, column, ref AllLayerMaskColumns);
 01338        }
 1339
 1340        public ref Bounds GetBoundsRef(int row, int column)
 01341        {
 01342            return ref GetCellRef(row, column, ref AllBoundsColumns);
 01343        }
 1344
 1345        public ref BoundsInt GetBoundsIntRef(int row, int column)
 01346        {
 01347            return ref GetCellRef(row, column, ref AllBoundsIntColumns);
 01348        }
 1349
 1350        public ref Hash128 GetHash128Ref(int row, int column)
 01351        {
 01352            return ref GetCellRef(row, column, ref AllHash128Columns);
 01353        }
 1354
 1355        public ref Gradient GetGradientRef(int row, int column)
 01356        {
 01357            return ref GetCellRef(row, column, ref AllGradientColumns);
 01358        }
 1359
 1360        public ref AnimationCurve GetAnimationCurveRef(int row, int column)
 01361        {
 01362            return ref GetCellRef(row, column, ref AllAnimationCurveColumns);
 01363        }
 1364
 1365        public ref Object GetObjectRef(int row, int column)
 01366        {
 01367            return ref GetCellRef(row, column, ref AllObjectRefColumns);
 01368        }
 1369
 1370        // Get Column
 1371
 1372        public string[] GetStringColumn(int column)
 01373        {
 01374            return GetColumn(column, ref AllStringColumns);
 01375        }
 1376
 1377        public bool[] GetBoolColumn(int column)
 01378        {
 01379            return GetColumn(column, ref AllBoolColumns);
 01380        }
 1381
 1382        public char[] GetCharColumn(int column)
 01383        {
 01384            return GetColumn(column, ref AllCharColumns);
 01385        }
 1386
 1387        public sbyte[] GetSbyteColumn(int column)
 01388        {
 01389            return GetColumn(column, ref AllSbyteColumns);
 01390        }
 1391
 1392        public byte[] GetByteColumn(int column)
 01393        {
 01394            return GetColumn(column, ref AllByteColumns);
 01395        }
 1396
 1397        public short[] GetShortColumn(int column)
 01398        {
 01399            return GetColumn(column, ref AllShortColumns);
 01400        }
 1401
 1402        public ushort[] GetUshortColumn(int column)
 01403        {
 01404            return GetColumn(column, ref AllUshortColumns);
 01405        }
 1406
 1407        public int[] GetIntColumn(int column)
 01408        {
 01409            return GetColumn(column, ref AllIntColumns);
 01410        }
 1411
 1412        public uint[] GetUintColumn(int column)
 01413        {
 01414            return GetColumn(column, ref AllUintColumns);
 01415        }
 1416
 1417        public long[] GetLongColumn(int column)
 01418        {
 01419            return GetColumn(column, ref AllLongColumns);
 01420        }
 1421
 1422        public ulong[] GetUlongColumn(int column)
 01423        {
 01424            return GetColumn(column, ref AllUlongColumns);
 01425        }
 1426
 1427        public float[] GetFloatColumn(int column)
 01428        {
 01429            return GetColumn(column, ref AllFloatColumns);
 01430        }
 1431
 1432        public double[] GetDoubleColumn(int column)
 01433        {
 01434            return GetColumn(column, ref AllDoubleColumns);
 01435        }
 1436
 1437        public Vector2[] GetVector2Column(int column)
 01438        {
 01439            return GetColumn(column, ref AllVector2Columns);
 01440        }
 1441
 1442        public Vector3[] GetVector3Column(int column)
 01443        {
 01444            return GetColumn(column, ref AllVector3Columns);
 01445        }
 1446
 1447        public Vector4[] GetVector4Column(int column)
 01448        {
 01449            return GetColumn(column, ref AllVector4Columns);
 01450        }
 1451
 1452        public Vector2Int[] GetVector2IntColumn(int column)
 01453        {
 01454            return GetColumn(column, ref AllVector2IntColumns);
 01455        }
 1456
 1457        public Vector3Int[] GetVector3IntColumn(int column)
 01458        {
 01459            return GetColumn(column, ref AllVector3IntColumns);
 01460        }
 1461
 1462        public Quaternion[] GetQuaternionColumn(int column)
 01463        {
 01464            return GetColumn(column, ref AllQuaternionColumns);
 01465        }
 1466
 1467        public Rect[] GetRectColumn(int column)
 01468        {
 01469            return GetColumn(column, ref AllRectColumns);
 01470        }
 1471
 1472        public RectInt[] GetRectIntColumn(int column)
 01473        {
 01474            return GetColumn(column, ref AllRectIntColumns);
 01475        }
 1476
 1477        public Color[] GetColorColumn(int column)
 01478        {
 01479            return GetColumn(column, ref AllColorColumns);
 01480        }
 1481
 1482        public LayerMask[] GetLayerMaskColumn(int column)
 01483        {
 01484            return GetColumn(column, ref AllLayerMaskColumns);
 01485        }
 1486
 1487        public Bounds[] GetBoundsColumn(int column)
 01488        {
 01489            return GetColumn(column, ref AllBoundsColumns);
 01490        }
 1491
 1492        public BoundsInt[] GetBoundsIntColumn(int column)
 01493        {
 01494            return GetColumn(column, ref AllBoundsIntColumns);
 01495        }
 1496
 1497        public Hash128[] GetHash128Column(int column)
 01498        {
 01499            return GetColumn(column, ref AllHash128Columns);
 01500        }
 1501
 1502        public Gradient[] GetGradientColumn(int column)
 01503        {
 01504            return GetColumn(column, ref AllGradientColumns);
 01505        }
 1506
 1507        public AnimationCurve[] GetAnimationCurveColumn(int column)
 01508        {
 01509            return GetColumn(column, ref AllAnimationCurveColumns);
 01510        }
 1511
 1512        public Object[] GetObjectColumn(int column)
 01513        {
 01514            return GetColumn(column, ref AllObjectRefColumns);
 01515        }
 1516
 1517        // SetOrder
 1518
 1519        public void SetColumnOrder(int columnID, int newSortOrder)
 01520        {
 01521            AssertColumnIDValid(columnID);
 01522            AssertColumnSortOrderValid(newSortOrder);
 01523            int oldSortOrder = ColumnIDToSortOrderMap[columnID];
 01524            int iterDirection = newSortOrder > oldSortOrder ? 1 : -1;
 01525            for (int i = oldSortOrder; i != newSortOrder; i += iterDirection)
 01526            {
 01527                int columnIDAt = SortedOrderToColumnIDMap[i + iterDirection];
 01528                ColumnIDToSortOrderMap[columnIDAt] = i;
 01529                SortedOrderToColumnIDMap[i] = SortedOrderToColumnIDMap[i + iterDirection];
 01530            }
 1531
 01532            SortedOrderToColumnIDMap[newSortOrder] = columnID;
 01533            ColumnIDToSortOrderMap[columnID] = newSortOrder;
 01534        }
 1535
 1536        public void SetAllColumnOrders(int[] sortedColumnIDs)
 01537        {
 01538            AssertSortedColumnsArgValid(sortedColumnIDs);
 01539            for (int i = 0; i < SortedOrderToColumnIDMap.Length; i++)
 01540            {
 01541                int columnID = sortedColumnIDs[i];
 01542                SortedOrderToColumnIDMap[i] = columnID;
 01543                ColumnIDToSortOrderMap[columnID] = i;
 01544            }
 01545        }
 1546
 1547        public void SetRowOrder(int rowID, int newSortOrder)
 01548        {
 01549            AssertRowIDValid(rowID);
 01550            AssertRowSortOrderValid(newSortOrder);
 1551
 01552            int oldSortOrder = RowIDToDenseIndexMap[rowID];
 01553            int iterDirection = newSortOrder > oldSortOrder ? 1 : -1;
 1554
 01555            for (int i = oldSortOrder; i != newSortOrder; i += iterDirection)
 01556            {
 01557                int rowIDAt = RowDenseIndexToIDMap[i + iterDirection];
 01558                RowIDToDenseIndexMap[rowIDAt] = i;
 01559                RowDenseIndexToIDMap[i] = RowDenseIndexToIDMap[i + iterDirection];
 01560            }
 1561
 01562            SetRowOrderForColumns(AllStringColumns, oldSortOrder, newSortOrder);
 01563            SetRowOrderForColumns(AllBoolColumns, oldSortOrder, newSortOrder);
 01564            SetRowOrderForColumns(AllCharColumns, oldSortOrder, newSortOrder);
 01565            SetRowOrderForColumns(AllSbyteColumns, oldSortOrder, newSortOrder);
 01566            SetRowOrderForColumns(AllByteColumns, oldSortOrder, newSortOrder);
 01567            SetRowOrderForColumns(AllShortColumns, oldSortOrder, newSortOrder);
 01568            SetRowOrderForColumns(AllUshortColumns, oldSortOrder, newSortOrder);
 01569            SetRowOrderForColumns(AllIntColumns, oldSortOrder, newSortOrder);
 01570            SetRowOrderForColumns(AllUintColumns, oldSortOrder, newSortOrder);
 01571            SetRowOrderForColumns(AllLongColumns, oldSortOrder, newSortOrder);
 01572            SetRowOrderForColumns(AllUlongColumns, oldSortOrder, newSortOrder);
 01573            SetRowOrderForColumns(AllFloatColumns, oldSortOrder, newSortOrder);
 01574            SetRowOrderForColumns(AllDoubleColumns, oldSortOrder, newSortOrder);
 01575            SetRowOrderForColumns(AllVector2Columns, oldSortOrder, newSortOrder);
 01576            SetRowOrderForColumns(AllVector3Columns, oldSortOrder, newSortOrder);
 01577            SetRowOrderForColumns(AllVector4Columns, oldSortOrder, newSortOrder);
 01578            SetRowOrderForColumns(AllVector2IntColumns, oldSortOrder, newSortOrder);
 01579            SetRowOrderForColumns(AllVector3IntColumns, oldSortOrder, newSortOrder);
 01580            SetRowOrderForColumns(AllQuaternionColumns, oldSortOrder, newSortOrder);
 01581            SetRowOrderForColumns(AllRectColumns, oldSortOrder, newSortOrder);
 01582            SetRowOrderForColumns(AllRectIntColumns, oldSortOrder, newSortOrder);
 01583            SetRowOrderForColumns(AllColorColumns, oldSortOrder, newSortOrder);
 01584            SetRowOrderForColumns(AllLayerMaskColumns, oldSortOrder, newSortOrder);
 01585            SetRowOrderForColumns(AllBoundsColumns, oldSortOrder, newSortOrder);
 01586            SetRowOrderForColumns(AllBoundsIntColumns, oldSortOrder, newSortOrder);
 01587            SetRowOrderForColumns(AllHash128Columns, oldSortOrder, newSortOrder);
 01588            SetRowOrderForColumns(AllGradientColumns, oldSortOrder, newSortOrder);
 01589            SetRowOrderForColumns(AllAnimationCurveColumns, oldSortOrder, newSortOrder);
 01590            SetRowOrderForColumns(AllObjectRefColumns, oldSortOrder, newSortOrder);
 01591        }
 1592
 1593        public void SetAllRowOrders(int[] sortedRowIDs)
 01594        {
 01595            AssertSortRowsArgValid(sortedRowIDs);
 1596
 01597            ReSortRows(AllStringColumns, sortedRowIDs);
 01598            ReSortRows(AllBoolColumns, sortedRowIDs);
 01599            ReSortRows(AllCharColumns, sortedRowIDs);
 01600            ReSortRows(AllSbyteColumns, sortedRowIDs);
 01601            ReSortRows(AllByteColumns, sortedRowIDs);
 01602            ReSortRows(AllShortColumns, sortedRowIDs);
 01603            ReSortRows(AllUshortColumns, sortedRowIDs);
 01604            ReSortRows(AllIntColumns, sortedRowIDs);
 01605            ReSortRows(AllUintColumns, sortedRowIDs);
 01606            ReSortRows(AllLongColumns, sortedRowIDs);
 01607            ReSortRows(AllUlongColumns, sortedRowIDs);
 01608            ReSortRows(AllFloatColumns, sortedRowIDs);
 01609            ReSortRows(AllDoubleColumns, sortedRowIDs);
 01610            ReSortRows(AllVector2Columns, sortedRowIDs);
 01611            ReSortRows(AllVector3Columns, sortedRowIDs);
 01612            ReSortRows(AllVector4Columns, sortedRowIDs);
 01613            ReSortRows(AllVector2IntColumns, sortedRowIDs);
 01614            ReSortRows(AllVector3IntColumns, sortedRowIDs);
 01615            ReSortRows(AllQuaternionColumns, sortedRowIDs);
 01616            ReSortRows(AllRectColumns, sortedRowIDs);
 01617            ReSortRows(AllRectIntColumns, sortedRowIDs);
 01618            ReSortRows(AllColorColumns, sortedRowIDs);
 01619            ReSortRows(AllLayerMaskColumns, sortedRowIDs);
 01620            ReSortRows(AllBoundsColumns, sortedRowIDs);
 01621            ReSortRows(AllBoundsIntColumns, sortedRowIDs);
 01622            ReSortRows(AllHash128Columns, sortedRowIDs);
 01623            ReSortRows(AllGradientColumns, sortedRowIDs);
 01624            ReSortRows(AllAnimationCurveColumns, sortedRowIDs);
 01625            ReSortRows(AllObjectRefColumns, sortedRowIDs);
 1626
 01627            for (int i = 0; i < sortedRowIDs.Length; i++)
 01628            {
 01629                int rowID = sortedRowIDs[i];
 01630                RowDenseIndexToIDMap[i] = rowID;
 01631                RowIDToDenseIndexMap[rowID] = i;
 01632            }
 01633        }
 1634
 1635        internal void ReSortRows<T>(ArrayHolder<T>[] columns, int[] sortedRowIDs)
 01636        {
 01637            int columnCount = columns?.Length ?? 0;
 01638            for (int i = 0; i < columnCount; i++)
 01639            {
 01640                T[] column = columns[i].TArray;
 01641                T[] newColumn = new T[column.Length];
 01642                for (int j = 0; j < sortedRowIDs.Length; j++)
 01643                {
 01644                    int rowID = sortedRowIDs[j];
 01645                    int oldRowIndex = RowIDToDenseIndexMap[rowID];
 1646
 01647                    newColumn[j] = column[oldRowIndex];
 01648                }
 1649
 01650                columns[i].TArray = newColumn;
 01651            }
 01652        }
 1653
 1654        // Internal
 1655
 1656        internal void AddTypeNameEntryForUnityObjectColumn()
 01657        {
 01658            int nameArrayLength = AllObjectRefTypeNames?.Length ?? 0;
 01659            Array.Resize(ref AllObjectRefTypeNames, nameArrayLength + 1);
 01660            AllObjectRefTypeNames[nameArrayLength] = UnityObjectString;
 01661        }
 1662
 1663        internal void RemoveTypeNameEntryForUnityObjectColumn(int columnDenseIndex)
 01664        {
 01665            int nameArrayLength = AllObjectRefTypeNames?.Length ?? 0;
 01666            AllObjectRefTypeNames[columnDenseIndex] = AllObjectRefTypeNames[nameArrayLength];
 01667            Array.Resize(ref AllObjectRefTypeNames, nameArrayLength - 1);
 01668        }
 1669
 1670        internal void AssertObjectColumnIDValid(int columnID)
 01671        {
 01672            AssertColumnIDValid(columnID);
 01673            if (ColumnIDToDenseIndexMap[columnID].ColumnType != Serializable.SerializableTypes.Object)
 01674            {
 01675                throw new ArgumentException("Column ID must correspond to a UnityEngine.Object column.");
 1676            }
 01677        }
 1678
 1679        internal int AddColumnInternal<T>(string columnName, ref ArrayHolder<T>[] allColumnsOfType,
 1680            Serializable.SerializableTypes typeIndex, int insertAtColumnID)
 01681        {
 01682            if (insertAtColumnID >= 0)
 01683            {
 01684                AssertColumnIDValid(insertAtColumnID);
 01685            }
 1686
 01687            int columnCount = allColumnsOfType?.Length ?? 0;
 01688            Array.Resize(ref allColumnsOfType, columnCount + 1);
 01689            allColumnsOfType[columnCount].TArray = new T[RowCount];
 1690
 01691            int columnID = ColumnEntriesFreeListHead;
 01692            string[] columnNamesForType = AllColumnNames[(int)typeIndex].TArray;
 01693            int columnNamesCount = columnNamesForType?.Length ?? 0;
 01694            Array.Resize(ref columnNamesForType, columnNamesCount + 1);
 01695            columnNamesForType[columnNamesCount] = columnName == null ? columnID.ToString() : columnName;
 01696            AllColumnNames[(int)typeIndex].TArray = columnNamesForType;
 1697
 1698
 01699            int columnIDToDenseIndexMapLength = ColumnIDToDenseIndexMap?.Length ?? 0;
 01700            if (columnID >= columnIDToDenseIndexMapLength)
 01701            {
 01702                int newSize = columnIDToDenseIndexMapLength * 2;
 01703                newSize = newSize == 0 ? 1 : newSize;
 01704                Array.Resize(ref ColumnIDToDenseIndexMap, newSize);
 01705                for (int i = columnIDToDenseIndexMapLength; i < newSize; i++)
 01706                {
 01707                    ref ColumnEntry entry = ref ColumnIDToDenseIndexMap[i];
 01708                    entry.ColumnDenseIndex = i + 1;
 01709                    entry.ColumnType = Serializable.SerializableTypes.Invalid;
 01710                }
 1711
 01712                Array.Resize(ref ColumnIDToSortOrderMap, newSize);
 01713                for (int i = columnIDToDenseIndexMapLength; i < newSize; i++)
 01714                {
 01715                    ColumnIDToSortOrderMap[i] = -1;
 01716                }
 01717            }
 1718
 01719            ColumnEntriesFreeListHead = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 1720
 01721            ref int[] denseIndexToIDMap = ref ColumnDenseIndexToIDMap[(int)typeIndex].TArray;
 01722            int denseIndexToIDMapLength = denseIndexToIDMap?.Length ?? 0;
 01723            Array.Resize(ref denseIndexToIDMap, denseIndexToIDMapLength + 1);
 01724            denseIndexToIDMap[denseIndexToIDMapLength] = columnID;
 1725
 01726            ref ColumnEntry newEntry = ref ColumnIDToDenseIndexMap[columnID];
 01727            newEntry.ColumnDenseIndex = denseIndexToIDMapLength;
 01728            newEntry.ColumnType = typeIndex;
 1729
 01730            int insertAtSortedIndex =
 1731                insertAtColumnID < 0 ? CombinedColumnCount : ColumnIDToSortOrderMap[insertAtColumnID];
 01732            Array.Resize(ref SortedOrderToColumnIDMap, CombinedColumnCount + 1);
 01733            for (int i = CombinedColumnCount; i > insertAtSortedIndex; i--)
 01734            {
 01735                int currentColumnID = SortedOrderToColumnIDMap[i - 1];
 01736                SortedOrderToColumnIDMap[i] = currentColumnID;
 01737                ColumnIDToSortOrderMap[currentColumnID] = i;
 01738            }
 1739
 01740            if (typeIndex == Serializable.SerializableTypes.Object)
 01741            {
 01742                AddTypeNameEntryForUnityObjectColumn();
 01743            }
 1744
 01745            ColumnIDToSortOrderMap[columnID] = insertAtSortedIndex;
 01746            SortedOrderToColumnIDMap[insertAtSortedIndex] = columnID;
 1747
 01748            ++CombinedColumnCount;
 01749            DataVersion++;
 1750
 01751            return columnID;
 01752        }
 1753
 1754        internal void RemoveColumnInternal<T>(ref ArrayHolder<T>[] allColumnsOfType,
 1755            Serializable.SerializableTypes typeIndex, int columnID)
 01756        {
 01757            AssertColumnIDValid(columnID);
 01758            int columnLocation = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 1759
 01760            int lastIndex = allColumnsOfType.Length - 1;
 01761            allColumnsOfType[columnLocation] = allColumnsOfType[lastIndex];
 01762            Array.Resize(ref allColumnsOfType, lastIndex);
 1763
 01764            ref string[] columnNamesOfType = ref AllColumnNames[(int)typeIndex].TArray;
 01765            columnNamesOfType[columnLocation] = columnNamesOfType[lastIndex];
 01766            Array.Resize(ref columnNamesOfType, lastIndex);
 1767
 01768            int columnOrder = ColumnIDToSortOrderMap[columnID];
 1769
 01770            ref int[] denseIndicesOfType = ref ColumnDenseIndexToIDMap[(int)typeIndex].TArray;
 01771            int sparseIndexToSwap = denseIndicesOfType[lastIndex];
 1772
 01773            ColumnIDToDenseIndexMap[sparseIndexToSwap].ColumnDenseIndex = columnLocation;
 01774            ref ColumnEntry sparseIndexToFree = ref ColumnIDToDenseIndexMap[columnID];
 01775            sparseIndexToFree.ColumnType = Serializable.SerializableTypes.Invalid;
 01776            sparseIndexToFree.ColumnDenseIndex = ColumnEntriesFreeListHead;
 1777
 01778            ColumnEntriesFreeListHead = columnID;
 1779
 01780            denseIndicesOfType[columnLocation] = sparseIndexToSwap;
 01781            Array.Resize(ref denseIndicesOfType, lastIndex);
 1782
 01783            if (typeIndex == Serializable.SerializableTypes.Object)
 01784            {
 01785                RemoveTypeNameEntryForUnityObjectColumn(columnLocation);
 01786            }
 1787
 01788            for (int i = columnOrder + 1; i < CombinedColumnCount; i++)
 01789            {
 01790                int currentColumnID = SortedOrderToColumnIDMap[i];
 01791                SortedOrderToColumnIDMap[i - 1] = currentColumnID;
 01792                ColumnIDToSortOrderMap[currentColumnID] = i - 1;
 01793            }
 1794
 01795            ColumnIDToSortOrderMap[columnID] = -1;
 1796
 01797            Array.Resize(ref SortedOrderToColumnIDMap, CombinedColumnCount - 1);
 1798
 01799            --CombinedColumnCount;
 01800            DataVersion++;
 01801        }
 1802
 1803        internal void InsertRowsOfTypeInternal<T>(ref ArrayHolder<T>[] allColumnsOfType, int insertAt,
 1804            int numberOfNewRows)
 01805        {
 01806            int columnCount = allColumnsOfType?.Length ?? 0;
 01807            for (int i = 0; i < columnCount; i++)
 01808            {
 01809                ref T[] rows = ref allColumnsOfType[i].TArray;
 01810                int newRowCount = RowCount + numberOfNewRows;
 01811                Array.Resize(ref rows, newRowCount);
 01812                for (int j = newRowCount - 1; j > insertAt + numberOfNewRows - 1; j--)
 01813                {
 01814                    rows[j] = rows[j - numberOfNewRows];
 01815                }
 1816
 01817                for (int j = 0; j < numberOfNewRows; j++)
 01818                {
 01819                    rows[insertAt + j] = default;
 01820                }
 01821            }
 01822        }
 1823
 1824        internal void DeleteRowsOfTypeInternal<T>(ref ArrayHolder<T>[] allColumnsOfType, int removeAt,
 1825            int numberOfRowsToDelete)
 01826        {
 01827            int columnCount = allColumnsOfType?.Length ?? 0;
 1828
 01829            for (int i = 0; i < columnCount; i++)
 01830            {
 01831                ref T[] rows = ref allColumnsOfType[i].TArray;
 01832                int newRowCount = RowCount - numberOfRowsToDelete;
 1833
 01834                for (int j = removeAt + numberOfRowsToDelete; j < RowCount; j++)
 01835                {
 01836                    rows[j - numberOfRowsToDelete] = rows[j];
 01837                }
 1838
 01839                Array.Resize(ref rows, newRowCount);
 01840            }
 01841        }
 1842
 1843        internal ref T GetCellRef<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01844        {
 01845            AssertColumnIDValid(columnID);
 01846            AssertRowIDValid(rowID);
 01847            int column = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 01848            int row = RowIDToDenseIndexMap[rowID];
 01849            return ref allColumnsOfType[column][row];
 01850        }
 1851
 1852        internal T GetCell<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01853        {
 01854            AssertColumnIDValid(columnID);
 01855            AssertRowIDValid(rowID);
 01856            int column = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 01857            int row = RowIDToDenseIndexMap[rowID];
 01858            return allColumnsOfType[column][row];
 01859        }
 1860
 1861        internal ulong SetCell<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType, T value)
 01862        {
 01863            AssertColumnIDValid(columnID);
 01864            AssertRowIDValid(rowID);
 01865            int column = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 01866            int row = RowIDToDenseIndexMap[rowID];
 01867            allColumnsOfType[column][row] = value;
 01868            DataVersion++;
 01869            return DataVersion;
 01870        }
 1871
 1872        internal T[] GetColumn<T>(int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01873        {
 01874            AssertColumnIDValid(columnID);
 01875            int column = ColumnIDToDenseIndexMap[columnID].ColumnDenseIndex;
 01876            return allColumnsOfType[column].TArray;
 01877        }
 1878
 1879        internal void SetRowOrderForColumns<T>(ArrayHolder<T>[] columns, int oldSortOrder, int newSortOrder)
 01880        {
 01881            int columnCount = columns?.Length ?? 0;
 01882            int iterDirection = newSortOrder > oldSortOrder ? 1 : -1;
 01883            for (int i = 0; i < columnCount; i++)
 01884            {
 01885                T[] column = columns[i].TArray;
 1886
 01887                for (int j = oldSortOrder; j != newSortOrder; j += iterDirection)
 01888                {
 01889                    column[j] = column[j + iterDirection];
 01890                }
 01891            }
 01892        }
 1893
 1894        internal void AssertSortedColumnsArgValid(int[] sortedColumnIDs)
 01895        {
 01896            if (sortedColumnIDs == null)
 01897            {
 01898                throw new ArgumentException("sortedColumnIDs array cannot be null.");
 1899            }
 1900
 01901            if (sortedColumnIDs.Length != SortedOrderToColumnIDMap.Length)
 01902            {
 01903                throw new ArgumentException("sortedColumnIDs array must be the same length as GetColumnCount.");
 1904            }
 1905
 01906            for (int i = 0; i < sortedColumnIDs.Length; i++)
 01907            {
 01908                AssertColumnIDValid(sortedColumnIDs[i]);
 01909            }
 01910        }
 1911
 1912        internal void AssertColumnSortOrderValid(int sortedOrder)
 01913        {
 01914            if (sortedOrder >= CombinedColumnCount || sortedOrder < 0)
 01915            {
 01916                throw new ArgumentException("Invalid column sort order argument: " + sortedOrder);
 1917            }
 01918        }
 1919
 1920        internal void AssertRowSortOrderValid(int sortedOrder)
 01921        {
 01922            if (sortedOrder >= RowCount || sortedOrder < 0)
 01923            {
 01924                throw new ArgumentException("Invalid row sort order argument: " + sortedOrder);
 1925            }
 01926        }
 1927
 1928        internal void AssertSortRowsArgValid(int[] sortedRowIDs)
 01929        {
 01930            if (sortedRowIDs == null)
 01931            {
 01932                throw new ArgumentException("sortedRowIDs array cannot be null.");
 1933            }
 1934
 01935            if (sortedRowIDs.Length != RowDenseIndexToIDMap.Length)
 01936            {
 01937                throw new ArgumentException("sortedRowIDs array must be the same length as GetRowCount.");
 1938            }
 1939
 01940            for (int i = 0; i < sortedRowIDs.Length; i++)
 01941            {
 01942                AssertRowIDValid(sortedRowIDs[i]);
 01943            }
 01944        }
 1945
 1946        [Serializable]
 1947        internal struct ColumnEntry
 1948        {
 1949            public Serializable.SerializableTypes ColumnType;
 1950            public int ColumnDenseIndex;
 1951        }
 1952    }
 1953}

Coverage by test methods





































































































































































































































































































































































































































































































































































































































































































Methods/Properties

StableTable()
StableTable()
GetDataVersion()
GetColumnCount()
GetRowCount()
GetDisplayName()
SetDisplayName(System.String)
GetFlag(GDX.Tables.TableBase/Flags)
SetFlag(GDX.Tables.TableBase/Flags, System.Boolean)
GetAllRowDescriptions()
GetRowDescription(System.String)
GetRowDescription(System.Int32)
SetAllRowDescriptionsOrder(GDX.Tables.TableBase/RowDescription[])
GetColumnDescription(System.String)
GetColumnDescription(System.Int32)
SetAllColumnDescriptionsOrder(GDX.Tables.TableBase/ColumnDescription[])
GetAllColumnDescriptions()
AssertColumnIDValid(System.Int32)
AssertRowIDValid(System.Int32)
SetColumnName(System.String, System.Int32)
GetColumnName(System.Int32)
SetRowName(System.String, System.Int32)
GetRowName(System.Int32)
GetRowNameRef(System.Int32)
GetColumnNameRef(System.Int32)
AddRow(System.String, System.Int32)
AddRows(System.Int32, System.String[], System.Int32)
AddRows(System.Int32, System.Int32[]&, System.String[], System.Int32)
RemoveRow(System.Int32)
AddColumn(GDX.Serializable/SerializableTypes, System.String, System.Int32)
RemoveColumn(GDX.Serializable/SerializableTypes, System.Int32)
SetString(System.Int32, System.Int32, System.String)
SetBool(System.Int32, System.Int32, System.Boolean)
SetChar(System.Int32, System.Int32, System.Char)
SetSByte(System.Int32, System.Int32, System.SByte)
SetByte(System.Int32, System.Int32, System.Byte)
SetShort(System.Int32, System.Int32, System.Int16)
SetUShort(System.Int32, System.Int32, System.UInt16)
SetInt(System.Int32, System.Int32, System.Int32)
SetUInt(System.Int32, System.Int32, System.UInt32)
SetLong(System.Int32, System.Int32, System.Int64)
SetULong(System.Int32, System.Int32, System.UInt64)
SetFloat(System.Int32, System.Int32, System.Single)
SetDouble(System.Int32, System.Int32, System.Double)
SetVector2(System.Int32, System.Int32, UnityEngine.Vector2)
SetVector3(System.Int32, System.Int32, UnityEngine.Vector3)
SetVector4(System.Int32, System.Int32, UnityEngine.Vector4)
SetVector2Int(System.Int32, System.Int32, UnityEngine.Vector2Int)
SetVector3Int(System.Int32, System.Int32, UnityEngine.Vector3Int)
SetQuaternion(System.Int32, System.Int32, UnityEngine.Quaternion)
SetRect(System.Int32, System.Int32, UnityEngine.Rect)
SetRectInt(System.Int32, System.Int32, UnityEngine.RectInt)
SetColor(System.Int32, System.Int32, UnityEngine.Color)
SetLayerMask(System.Int32, System.Int32, UnityEngine.LayerMask)
SetBounds(System.Int32, System.Int32, UnityEngine.Bounds)
SetBoundsInt(System.Int32, System.Int32, UnityEngine.BoundsInt)
SetHash128(System.Int32, System.Int32, UnityEngine.Hash128)
SetGradient(System.Int32, System.Int32, UnityEngine.Gradient)
SetAnimationCurve(System.Int32, System.Int32, UnityEngine.AnimationCurve)
SetObject(System.Int32, System.Int32, UnityEngine.Object)
SetTypeNameForObjectColumn(System.Int32, System.String)
GetTypeNameForObjectColumn(System.Int32)
GetString(System.Int32, System.Int32)
GetBool(System.Int32, System.Int32)
GetChar(System.Int32, System.Int32)
GetSByte(System.Int32, System.Int32)
GetByte(System.Int32, System.Int32)
GetShort(System.Int32, System.Int32)
GetUShort(System.Int32, System.Int32)
GetInt(System.Int32, System.Int32)
GetUInt(System.Int32, System.Int32)
GetLong(System.Int32, System.Int32)
GetULong(System.Int32, System.Int32)
GetFloat(System.Int32, System.Int32)
GetDouble(System.Int32, System.Int32)
GetVector2(System.Int32, System.Int32)
GetVector3(System.Int32, System.Int32)
GetVector4(System.Int32, System.Int32)
GetVector2Int(System.Int32, System.Int32)
GetVector3Int(System.Int32, System.Int32)
GetQuaternion(System.Int32, System.Int32)
GetRect(System.Int32, System.Int32)
GetRectInt(System.Int32, System.Int32)
GetColor(System.Int32, System.Int32)
GetLayerMask(System.Int32, System.Int32)
GetBounds(System.Int32, System.Int32)
GetBoundsInt(System.Int32, System.Int32)
GetHash128(System.Int32, System.Int32)
GetGradient(System.Int32, System.Int32)
GetAnimationCurve(System.Int32, System.Int32)
GetObject(System.Int32, System.Int32)
GetStringRef(System.Int32, System.Int32)
GetBoolRef(System.Int32, System.Int32)
GetCharRef(System.Int32, System.Int32)
GetSbyteRef(System.Int32, System.Int32)
GetByteRef(System.Int32, System.Int32)
GetShortRef(System.Int32, System.Int32)
GetUshortRef(System.Int32, System.Int32)
GetIntRef(System.Int32, System.Int32)
GetUintRef(System.Int32, System.Int32)
GetLongRef(System.Int32, System.Int32)
GetUlongRef(System.Int32, System.Int32)
GetFloatRef(System.Int32, System.Int32)
GetDoubleRef(System.Int32, System.Int32)
GetVector2Ref(System.Int32, System.Int32)
GetVector3Ref(System.Int32, System.Int32)
GetVector4Ref(System.Int32, System.Int32)
GetVector2IntRef(System.Int32, System.Int32)
GetVector3IntRef(System.Int32, System.Int32)
GetQuaternionRef(System.Int32, System.Int32)
GetRectRef(System.Int32, System.Int32)
GetRectIntRef(System.Int32, System.Int32)
GetColorRef(System.Int32, System.Int32)
GetLayerMaskRef(System.Int32, System.Int32)
GetBoundsRef(System.Int32, System.Int32)
GetBoundsIntRef(System.Int32, System.Int32)
GetHash128Ref(System.Int32, System.Int32)
GetGradientRef(System.Int32, System.Int32)
GetAnimationCurveRef(System.Int32, System.Int32)
GetObjectRef(System.Int32, System.Int32)
GetStringColumn(System.Int32)
GetBoolColumn(System.Int32)
GetCharColumn(System.Int32)
GetSbyteColumn(System.Int32)
GetByteColumn(System.Int32)
GetShortColumn(System.Int32)
GetUshortColumn(System.Int32)
GetIntColumn(System.Int32)
GetUintColumn(System.Int32)
GetLongColumn(System.Int32)
GetUlongColumn(System.Int32)
GetFloatColumn(System.Int32)
GetDoubleColumn(System.Int32)
GetVector2Column(System.Int32)
GetVector3Column(System.Int32)
GetVector4Column(System.Int32)
GetVector2IntColumn(System.Int32)
GetVector3IntColumn(System.Int32)
GetQuaternionColumn(System.Int32)
GetRectColumn(System.Int32)
GetRectIntColumn(System.Int32)
GetColorColumn(System.Int32)
GetLayerMaskColumn(System.Int32)
GetBoundsColumn(System.Int32)
GetBoundsIntColumn(System.Int32)
GetHash128Column(System.Int32)
GetGradientColumn(System.Int32)
GetAnimationCurveColumn(System.Int32)
GetObjectColumn(System.Int32)
SetColumnOrder(System.Int32, System.Int32)
SetAllColumnOrders(System.Int32[])
SetRowOrder(System.Int32, System.Int32)
SetAllRowOrders(System.Int32[])
ReSortRows[T](, System.Int32[])
AddTypeNameEntryForUnityObjectColumn()
RemoveTypeNameEntryForUnityObjectColumn(System.Int32)
AssertObjectColumnIDValid(System.Int32)
AddColumnInternal[T](System.String, , GDX.Serializable/SerializableTypes, System.Int32)
RemoveColumnInternal[T](, GDX.Serializable/SerializableTypes, System.Int32)
InsertRowsOfTypeInternal[T](, System.Int32, System.Int32)
DeleteRowsOfTypeInternal[T](, System.Int32, System.Int32)
GetCellRef[T](System.Int32, System.Int32, )
GetCell[T](System.Int32, System.Int32, )
SetCell[T](System.Int32, System.Int32, , T)
GetColumn[T](System.Int32, )
SetRowOrderForColumns[T](, System.Int32, System.Int32)
AssertSortedColumnsArgValid(System.Int32[])
AssertColumnSortOrderValid(System.Int32)
AssertRowSortOrderValid(System.Int32)
AssertSortRowsArgValid(System.Int32[])